{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- A [iface/@completionProvider@/] for the completion of snippets.
-- 
-- The @GtkSourceCompletionSnippets@ is an example of an implementation of
-- the [iface/@completionProvider@/] interface. The proposals are snippets
-- registered with the [class/@snippetManager@/].

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

module GI.GtkSource.Objects.CompletionSnippets
    ( 

-- * Exported types
    CompletionSnippets(..)                  ,
    IsCompletionSnippets                    ,
    toCompletionSnippets                    ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [activate]("GI.GtkSource.Interfaces.CompletionProvider#g:method:activate"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [display]("GI.GtkSource.Interfaces.CompletionProvider#g:method:display"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isTrigger]("GI.GtkSource.Interfaces.CompletionProvider#g:method:isTrigger"), [keyActivates]("GI.GtkSource.Interfaces.CompletionProvider#g:method:keyActivates"), [listAlternates]("GI.GtkSource.Interfaces.CompletionProvider#g:method:listAlternates"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [populateAsync]("GI.GtkSource.Interfaces.CompletionProvider#g:method:populateAsync"), [populateFinish]("GI.GtkSource.Interfaces.CompletionProvider#g:method:populateFinish"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [refilter]("GI.GtkSource.Interfaces.CompletionProvider#g:method:refilter"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getPriority]("GI.GtkSource.Interfaces.CompletionProvider#g:method:getPriority"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getTitle]("GI.GtkSource.Interfaces.CompletionProvider#g:method:getTitle").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveCompletionSnippetsMethod         ,
#endif

-- ** new #method:new#

    completionSnippetsNew                   ,




 -- * Properties


-- ** priority #attr:priority#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    CompletionSnippetsPriorityPropertyInfo  ,
#endif
#if defined(ENABLE_OVERLOADING)
    completionSnippetsPriority              ,
#endif
    constructCompletionSnippetsPriority     ,
    getCompletionSnippetsPriority           ,
    setCompletionSnippetsPriority           ,


-- ** title #attr:title#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    CompletionSnippetsTitlePropertyInfo     ,
#endif
    clearCompletionSnippetsTitle            ,
#if defined(ENABLE_OVERLOADING)
    completionSnippetsTitle                 ,
#endif
    constructCompletionSnippetsTitle        ,
    getCompletionSnippetsTitle              ,
    setCompletionSnippetsTitle              ,




    ) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.Settings as Gio.Settings
import qualified GI.Gtk.Enums as Gtk.Enums
import qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import qualified GI.Gtk.Interfaces.AccessibleText as Gtk.AccessibleText
import qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import qualified GI.Gtk.Interfaces.Scrollable as Gtk.Scrollable
import qualified GI.Gtk.Objects.TextBuffer as Gtk.TextBuffer
import qualified GI.Gtk.Objects.TextMark as Gtk.TextMark
import qualified GI.Gtk.Objects.TextTag as Gtk.TextTag
import qualified GI.Gtk.Objects.TextTagTable as Gtk.TextTagTable
import qualified GI.Gtk.Objects.TextView as Gtk.TextView
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
import qualified GI.Gtk.Structs.TextIter as Gtk.TextIter
import {-# SOURCE #-} qualified GI.GtkSource.Enums as GtkSource.Enums
import {-# SOURCE #-} qualified GI.GtkSource.Flags as GtkSource.Flags
import {-# SOURCE #-} qualified GI.GtkSource.Interfaces.CompletionProposal as GtkSource.CompletionProposal
import {-# SOURCE #-} qualified GI.GtkSource.Interfaces.CompletionProvider as GtkSource.CompletionProvider
import {-# SOURCE #-} qualified GI.GtkSource.Interfaces.HoverProvider as GtkSource.HoverProvider
import {-# SOURCE #-} qualified GI.GtkSource.Interfaces.Indenter as GtkSource.Indenter
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Buffer as GtkSource.Buffer
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Completion as GtkSource.Completion
import {-# SOURCE #-} qualified GI.GtkSource.Objects.CompletionCell as GtkSource.CompletionCell
import {-# SOURCE #-} qualified GI.GtkSource.Objects.CompletionContext as GtkSource.CompletionContext
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Gutter as GtkSource.Gutter
import {-# SOURCE #-} qualified GI.GtkSource.Objects.GutterLines as GtkSource.GutterLines
import {-# SOURCE #-} qualified GI.GtkSource.Objects.GutterRenderer as GtkSource.GutterRenderer
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Hover as GtkSource.Hover
import {-# SOURCE #-} qualified GI.GtkSource.Objects.HoverContext as GtkSource.HoverContext
import {-# SOURCE #-} qualified GI.GtkSource.Objects.HoverDisplay as GtkSource.HoverDisplay
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Language as GtkSource.Language
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Mark as GtkSource.Mark
import {-# SOURCE #-} qualified GI.GtkSource.Objects.MarkAttributes as GtkSource.MarkAttributes
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Snippet as GtkSource.Snippet
import {-# SOURCE #-} qualified GI.GtkSource.Objects.SnippetChunk as GtkSource.SnippetChunk
import {-# SOURCE #-} qualified GI.GtkSource.Objects.SnippetContext as GtkSource.SnippetContext
import {-# SOURCE #-} qualified GI.GtkSource.Objects.SpaceDrawer as GtkSource.SpaceDrawer
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Style as GtkSource.Style
import {-# SOURCE #-} qualified GI.GtkSource.Objects.StyleScheme as GtkSource.StyleScheme
import {-# SOURCE #-} qualified GI.GtkSource.Objects.View as GtkSource.View
import qualified GI.Pango.Enums as Pango.Enums
import qualified GI.Pango.Structs.AttrList as Pango.AttrList

#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.GtkSource.Interfaces.CompletionProvider as GtkSource.CompletionProvider

#endif

-- | Memory-managed wrapper type.
newtype CompletionSnippets = CompletionSnippets (SP.ManagedPtr CompletionSnippets)
    deriving (CompletionSnippets -> CompletionSnippets -> Bool
(CompletionSnippets -> CompletionSnippets -> Bool)
-> (CompletionSnippets -> CompletionSnippets -> Bool)
-> Eq CompletionSnippets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionSnippets -> CompletionSnippets -> Bool
== :: CompletionSnippets -> CompletionSnippets -> Bool
$c/= :: CompletionSnippets -> CompletionSnippets -> Bool
/= :: CompletionSnippets -> CompletionSnippets -> Bool
Eq)

instance SP.ManagedPtrNewtype CompletionSnippets where
    toManagedPtr :: CompletionSnippets -> ManagedPtr CompletionSnippets
toManagedPtr (CompletionSnippets ManagedPtr CompletionSnippets
p) = ManagedPtr CompletionSnippets
p

foreign import ccall "gtk_source_completion_snippets_get_type"
    c_gtk_source_completion_snippets_get_type :: IO B.Types.GType

instance B.Types.TypedObject CompletionSnippets where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_completion_snippets_get_type

instance B.Types.GObject CompletionSnippets

-- | Type class for types which can be safely cast to `CompletionSnippets`, for instance with `toCompletionSnippets`.
class (SP.GObject o, O.IsDescendantOf CompletionSnippets o) => IsCompletionSnippets o
instance (SP.GObject o, O.IsDescendantOf CompletionSnippets o) => IsCompletionSnippets o

instance O.HasParentTypes CompletionSnippets
type instance O.ParentTypes CompletionSnippets = '[GObject.Object.Object, GtkSource.CompletionProvider.CompletionProvider]

-- | Cast to `CompletionSnippets`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toCompletionSnippets :: (MIO.MonadIO m, IsCompletionSnippets o) => o -> m CompletionSnippets
toCompletionSnippets :: forall (m :: * -> *) o.
(MonadIO m, IsCompletionSnippets o) =>
o -> m CompletionSnippets
toCompletionSnippets = IO CompletionSnippets -> m CompletionSnippets
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO CompletionSnippets -> m CompletionSnippets)
-> (o -> IO CompletionSnippets) -> o -> m CompletionSnippets
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr CompletionSnippets -> CompletionSnippets)
-> o -> IO CompletionSnippets
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr CompletionSnippets -> CompletionSnippets
CompletionSnippets

-- | Convert 'CompletionSnippets' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe CompletionSnippets) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_source_completion_snippets_get_type
    gvalueSet_ :: Ptr GValue -> Maybe CompletionSnippets -> IO ()
gvalueSet_ Ptr GValue
gv Maybe CompletionSnippets
P.Nothing = Ptr GValue -> Ptr CompletionSnippets -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr CompletionSnippets
forall a. Ptr a
FP.nullPtr :: FP.Ptr CompletionSnippets)
    gvalueSet_ Ptr GValue
gv (P.Just CompletionSnippets
obj) = CompletionSnippets -> (Ptr CompletionSnippets -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr CompletionSnippets
obj (Ptr GValue -> Ptr CompletionSnippets -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe CompletionSnippets)
gvalueGet_ Ptr GValue
gv = do
        Ptr CompletionSnippets
ptr <- Ptr GValue -> IO (Ptr CompletionSnippets)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr CompletionSnippets)
        if Ptr CompletionSnippets
ptr Ptr CompletionSnippets -> Ptr CompletionSnippets -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr CompletionSnippets
forall a. Ptr a
FP.nullPtr
        then CompletionSnippets -> Maybe CompletionSnippets
forall a. a -> Maybe a
P.Just (CompletionSnippets -> Maybe CompletionSnippets)
-> IO CompletionSnippets -> IO (Maybe CompletionSnippets)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr CompletionSnippets -> CompletionSnippets)
-> Ptr CompletionSnippets -> IO CompletionSnippets
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr CompletionSnippets -> CompletionSnippets
CompletionSnippets Ptr CompletionSnippets
ptr
        else Maybe CompletionSnippets -> IO (Maybe CompletionSnippets)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe CompletionSnippets
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveCompletionSnippetsMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveCompletionSnippetsMethod "activate" o = GtkSource.CompletionProvider.CompletionProviderActivateMethodInfo
    ResolveCompletionSnippetsMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveCompletionSnippetsMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveCompletionSnippetsMethod "display" o = GtkSource.CompletionProvider.CompletionProviderDisplayMethodInfo
    ResolveCompletionSnippetsMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveCompletionSnippetsMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveCompletionSnippetsMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveCompletionSnippetsMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveCompletionSnippetsMethod "isTrigger" o = GtkSource.CompletionProvider.CompletionProviderIsTriggerMethodInfo
    ResolveCompletionSnippetsMethod "keyActivates" o = GtkSource.CompletionProvider.CompletionProviderKeyActivatesMethodInfo
    ResolveCompletionSnippetsMethod "listAlternates" o = GtkSource.CompletionProvider.CompletionProviderListAlternatesMethodInfo
    ResolveCompletionSnippetsMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveCompletionSnippetsMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveCompletionSnippetsMethod "populateAsync" o = GtkSource.CompletionProvider.CompletionProviderPopulateAsyncMethodInfo
    ResolveCompletionSnippetsMethod "populateFinish" o = GtkSource.CompletionProvider.CompletionProviderPopulateFinishMethodInfo
    ResolveCompletionSnippetsMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveCompletionSnippetsMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveCompletionSnippetsMethod "refilter" o = GtkSource.CompletionProvider.CompletionProviderRefilterMethodInfo
    ResolveCompletionSnippetsMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveCompletionSnippetsMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveCompletionSnippetsMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveCompletionSnippetsMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveCompletionSnippetsMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveCompletionSnippetsMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveCompletionSnippetsMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveCompletionSnippetsMethod "getPriority" o = GtkSource.CompletionProvider.CompletionProviderGetPriorityMethodInfo
    ResolveCompletionSnippetsMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveCompletionSnippetsMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveCompletionSnippetsMethod "getTitle" o = GtkSource.CompletionProvider.CompletionProviderGetTitleMethodInfo
    ResolveCompletionSnippetsMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveCompletionSnippetsMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveCompletionSnippetsMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveCompletionSnippetsMethod l o = O.MethodResolutionFailed l o

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

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveCompletionSnippetsMethod t CompletionSnippets, O.OverloadedMethod info CompletionSnippets p, R.HasField t CompletionSnippets p) => R.HasField t CompletionSnippets p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveCompletionSnippetsMethod t CompletionSnippets, O.OverloadedMethodInfo info CompletionSnippets) => OL.IsLabel t (O.MethodProxy info CompletionSnippets) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- VVV Prop "priority"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@priority@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' completionSnippets #priority
-- @
getCompletionSnippetsPriority :: (MonadIO m, IsCompletionSnippets o) => o -> m Int32
getCompletionSnippetsPriority :: forall (m :: * -> *) o.
(MonadIO m, IsCompletionSnippets o) =>
o -> m Int32
getCompletionSnippetsPriority o
obj = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"priority"

-- | Set the value of the “@priority@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' completionSnippets [ #priority 'Data.GI.Base.Attributes.:=' value ]
-- @
setCompletionSnippetsPriority :: (MonadIO m, IsCompletionSnippets o) => o -> Int32 -> m ()
setCompletionSnippetsPriority :: forall (m :: * -> *) o.
(MonadIO m, IsCompletionSnippets o) =>
o -> Int32 -> m ()
setCompletionSnippetsPriority o
obj Int32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"priority" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@priority@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCompletionSnippetsPriority :: (IsCompletionSnippets o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructCompletionSnippetsPriority :: forall o (m :: * -> *).
(IsCompletionSnippets o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructCompletionSnippetsPriority Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"priority" Int32
val

#if defined(ENABLE_OVERLOADING)
data CompletionSnippetsPriorityPropertyInfo
instance AttrInfo CompletionSnippetsPriorityPropertyInfo where
    type AttrAllowedOps CompletionSnippetsPriorityPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint CompletionSnippetsPriorityPropertyInfo = IsCompletionSnippets
    type AttrSetTypeConstraint CompletionSnippetsPriorityPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint CompletionSnippetsPriorityPropertyInfo = (~) Int32
    type AttrTransferType CompletionSnippetsPriorityPropertyInfo = Int32
    type AttrGetType CompletionSnippetsPriorityPropertyInfo = Int32
    type AttrLabel CompletionSnippetsPriorityPropertyInfo = "priority"
    type AttrOrigin CompletionSnippetsPriorityPropertyInfo = CompletionSnippets
    attrGet = getCompletionSnippetsPriority
    attrSet = setCompletionSnippetsPriority
    attrTransfer _ v = do
        return v
    attrConstruct = constructCompletionSnippetsPriority
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.CompletionSnippets.priority"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.1/docs/GI-GtkSource-Objects-CompletionSnippets.html#g:attr:priority"
        })
#endif

-- VVV Prop "title"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]
   -- Nullable: (Nothing,Nothing)

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

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

-- | Construct a `GValueConstruct` with valid value for the “@title@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCompletionSnippetsTitle :: (IsCompletionSnippets o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructCompletionSnippetsTitle :: forall o (m :: * -> *).
(IsCompletionSnippets o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructCompletionSnippetsTitle Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"title" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

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

#if defined(ENABLE_OVERLOADING)
data CompletionSnippetsTitlePropertyInfo
instance AttrInfo CompletionSnippetsTitlePropertyInfo where
    type AttrAllowedOps CompletionSnippetsTitlePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CompletionSnippetsTitlePropertyInfo = IsCompletionSnippets
    type AttrSetTypeConstraint CompletionSnippetsTitlePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint CompletionSnippetsTitlePropertyInfo = (~) T.Text
    type AttrTransferType CompletionSnippetsTitlePropertyInfo = T.Text
    type AttrGetType CompletionSnippetsTitlePropertyInfo = (Maybe T.Text)
    type AttrLabel CompletionSnippetsTitlePropertyInfo = "title"
    type AttrOrigin CompletionSnippetsTitlePropertyInfo = CompletionSnippets
    attrGet = getCompletionSnippetsTitle
    attrSet = setCompletionSnippetsTitle
    attrTransfer _ v = do
        return v
    attrConstruct = constructCompletionSnippetsTitle
    attrClear = clearCompletionSnippetsTitle
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.CompletionSnippets.title"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.1/docs/GI-GtkSource-Objects-CompletionSnippets.html#g:attr:title"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList CompletionSnippets
type instance O.AttributeList CompletionSnippets = CompletionSnippetsAttributeList
type CompletionSnippetsAttributeList = ('[ '("priority", CompletionSnippetsPriorityPropertyInfo), '("title", CompletionSnippetsTitlePropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
completionSnippetsPriority :: AttrLabelProxy "priority"
completionSnippetsPriority = AttrLabelProxy

completionSnippetsTitle :: AttrLabelProxy "title"
completionSnippetsTitle = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList CompletionSnippets = CompletionSnippetsSignalList
type CompletionSnippetsSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

#endif

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

foreign import ccall "gtk_source_completion_snippets_new" gtk_source_completion_snippets_new :: 
    IO (Ptr CompletionSnippets)

-- | /No description available in the introspection data./
completionSnippetsNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m CompletionSnippets
completionSnippetsNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
m CompletionSnippets
completionSnippetsNew  = IO CompletionSnippets -> m CompletionSnippets
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CompletionSnippets -> m CompletionSnippets)
-> IO CompletionSnippets -> m CompletionSnippets
forall a b. (a -> b) -> a -> b
$ do
    Ptr CompletionSnippets
result <- IO (Ptr CompletionSnippets)
gtk_source_completion_snippets_new
    Text -> Ptr CompletionSnippets -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"completionSnippetsNew" Ptr CompletionSnippets
result
    CompletionSnippets
result' <- ((ManagedPtr CompletionSnippets -> CompletionSnippets)
-> Ptr CompletionSnippets -> IO CompletionSnippets
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr CompletionSnippets -> CompletionSnippets
CompletionSnippets) Ptr CompletionSnippets
result
    CompletionSnippets -> IO CompletionSnippets
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CompletionSnippets
result'

#if defined(ENABLE_OVERLOADING)
#endif