{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.EntryBuffer
(
EntryBuffer(..) ,
IsEntryBuffer ,
toEntryBuffer ,
#if defined(ENABLE_OVERLOADING)
ResolveEntryBufferMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
EntryBufferDeleteTextMethodInfo ,
#endif
entryBufferDeleteText ,
#if defined(ENABLE_OVERLOADING)
EntryBufferEmitDeletedTextMethodInfo ,
#endif
entryBufferEmitDeletedText ,
#if defined(ENABLE_OVERLOADING)
EntryBufferEmitInsertedTextMethodInfo ,
#endif
entryBufferEmitInsertedText ,
#if defined(ENABLE_OVERLOADING)
EntryBufferGetBytesMethodInfo ,
#endif
entryBufferGetBytes ,
#if defined(ENABLE_OVERLOADING)
EntryBufferGetLengthMethodInfo ,
#endif
entryBufferGetLength ,
#if defined(ENABLE_OVERLOADING)
EntryBufferGetMaxLengthMethodInfo ,
#endif
entryBufferGetMaxLength ,
#if defined(ENABLE_OVERLOADING)
EntryBufferGetTextMethodInfo ,
#endif
entryBufferGetText ,
#if defined(ENABLE_OVERLOADING)
EntryBufferInsertTextMethodInfo ,
#endif
entryBufferInsertText ,
entryBufferNew ,
#if defined(ENABLE_OVERLOADING)
EntryBufferSetMaxLengthMethodInfo ,
#endif
entryBufferSetMaxLength ,
#if defined(ENABLE_OVERLOADING)
EntryBufferSetTextMethodInfo ,
#endif
entryBufferSetText ,
#if defined(ENABLE_OVERLOADING)
EntryBufferLengthPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
entryBufferLength ,
#endif
getEntryBufferLength ,
#if defined(ENABLE_OVERLOADING)
EntryBufferMaxLengthPropertyInfo ,
#endif
constructEntryBufferMaxLength ,
#if defined(ENABLE_OVERLOADING)
entryBufferMaxLength ,
#endif
getEntryBufferMaxLength ,
setEntryBufferMaxLength ,
#if defined(ENABLE_OVERLOADING)
EntryBufferTextPropertyInfo ,
#endif
clearEntryBufferText ,
constructEntryBufferText ,
#if defined(ENABLE_OVERLOADING)
entryBufferText ,
#endif
getEntryBufferText ,
setEntryBufferText ,
C_EntryBufferDeletedTextCallback ,
EntryBufferDeletedTextCallback ,
#if defined(ENABLE_OVERLOADING)
EntryBufferDeletedTextSignalInfo ,
#endif
afterEntryBufferDeletedText ,
genClosure_EntryBufferDeletedText ,
mk_EntryBufferDeletedTextCallback ,
noEntryBufferDeletedTextCallback ,
onEntryBufferDeletedText ,
wrap_EntryBufferDeletedTextCallback ,
C_EntryBufferInsertedTextCallback ,
EntryBufferInsertedTextCallback ,
#if defined(ENABLE_OVERLOADING)
EntryBufferInsertedTextSignalInfo ,
#endif
afterEntryBufferInsertedText ,
genClosure_EntryBufferInsertedText ,
mk_EntryBufferInsertedTextCallback ,
noEntryBufferInsertedTextCallback ,
onEntryBufferInsertedText ,
wrap_EntryBufferInsertedTextCallback ,
) 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.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.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 GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
newtype EntryBuffer = EntryBuffer (SP.ManagedPtr EntryBuffer)
deriving (EntryBuffer -> EntryBuffer -> Bool
(EntryBuffer -> EntryBuffer -> Bool)
-> (EntryBuffer -> EntryBuffer -> Bool) -> Eq EntryBuffer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EntryBuffer -> EntryBuffer -> Bool
$c/= :: EntryBuffer -> EntryBuffer -> Bool
== :: EntryBuffer -> EntryBuffer -> Bool
$c== :: EntryBuffer -> EntryBuffer -> Bool
Eq)
instance SP.ManagedPtrNewtype EntryBuffer where
toManagedPtr :: EntryBuffer -> ManagedPtr EntryBuffer
toManagedPtr (EntryBuffer ManagedPtr EntryBuffer
p) = ManagedPtr EntryBuffer
p
foreign import ccall "gtk_entry_buffer_get_type"
c_gtk_entry_buffer_get_type :: IO B.Types.GType
instance B.Types.TypedObject EntryBuffer where
glibType :: IO GType
glibType = IO GType
c_gtk_entry_buffer_get_type
instance B.Types.GObject EntryBuffer
class (SP.GObject o, O.IsDescendantOf EntryBuffer o) => IsEntryBuffer o
instance (SP.GObject o, O.IsDescendantOf EntryBuffer o) => IsEntryBuffer o
instance O.HasParentTypes EntryBuffer
type instance O.ParentTypes EntryBuffer = '[GObject.Object.Object]
toEntryBuffer :: (MIO.MonadIO m, IsEntryBuffer o) => o -> m EntryBuffer
toEntryBuffer :: forall (m :: * -> *) o.
(MonadIO m, IsEntryBuffer o) =>
o -> m EntryBuffer
toEntryBuffer = IO EntryBuffer -> m EntryBuffer
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO EntryBuffer -> m EntryBuffer)
-> (o -> IO EntryBuffer) -> o -> m EntryBuffer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr EntryBuffer -> EntryBuffer) -> o -> IO EntryBuffer
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr EntryBuffer -> EntryBuffer
EntryBuffer
instance B.GValue.IsGValue (Maybe EntryBuffer) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_entry_buffer_get_type
gvalueSet_ :: Ptr GValue -> Maybe EntryBuffer -> IO ()
gvalueSet_ Ptr GValue
gv Maybe EntryBuffer
P.Nothing = Ptr GValue -> Ptr EntryBuffer -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr EntryBuffer
forall a. Ptr a
FP.nullPtr :: FP.Ptr EntryBuffer)
gvalueSet_ Ptr GValue
gv (P.Just EntryBuffer
obj) = EntryBuffer -> (Ptr EntryBuffer -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr EntryBuffer
obj (Ptr GValue -> Ptr EntryBuffer -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe EntryBuffer)
gvalueGet_ Ptr GValue
gv = do
Ptr EntryBuffer
ptr <- Ptr GValue -> IO (Ptr EntryBuffer)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr EntryBuffer)
if Ptr EntryBuffer
ptr Ptr EntryBuffer -> Ptr EntryBuffer -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr EntryBuffer
forall a. Ptr a
FP.nullPtr
then EntryBuffer -> Maybe EntryBuffer
forall a. a -> Maybe a
P.Just (EntryBuffer -> Maybe EntryBuffer)
-> IO EntryBuffer -> IO (Maybe EntryBuffer)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr EntryBuffer -> EntryBuffer)
-> Ptr EntryBuffer -> IO EntryBuffer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr EntryBuffer -> EntryBuffer
EntryBuffer Ptr EntryBuffer
ptr
else Maybe EntryBuffer -> IO (Maybe EntryBuffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EntryBuffer
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveEntryBufferMethod (t :: Symbol) (o :: *) :: * where
ResolveEntryBufferMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveEntryBufferMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveEntryBufferMethod "deleteText" o = EntryBufferDeleteTextMethodInfo
ResolveEntryBufferMethod "emitDeletedText" o = EntryBufferEmitDeletedTextMethodInfo
ResolveEntryBufferMethod "emitInsertedText" o = EntryBufferEmitInsertedTextMethodInfo
ResolveEntryBufferMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveEntryBufferMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveEntryBufferMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveEntryBufferMethod "insertText" o = EntryBufferInsertTextMethodInfo
ResolveEntryBufferMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveEntryBufferMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveEntryBufferMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveEntryBufferMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveEntryBufferMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveEntryBufferMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveEntryBufferMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveEntryBufferMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveEntryBufferMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveEntryBufferMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveEntryBufferMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveEntryBufferMethod "getBytes" o = EntryBufferGetBytesMethodInfo
ResolveEntryBufferMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveEntryBufferMethod "getLength" o = EntryBufferGetLengthMethodInfo
ResolveEntryBufferMethod "getMaxLength" o = EntryBufferGetMaxLengthMethodInfo
ResolveEntryBufferMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveEntryBufferMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveEntryBufferMethod "getText" o = EntryBufferGetTextMethodInfo
ResolveEntryBufferMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveEntryBufferMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveEntryBufferMethod "setMaxLength" o = EntryBufferSetMaxLengthMethodInfo
ResolveEntryBufferMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveEntryBufferMethod "setText" o = EntryBufferSetTextMethodInfo
ResolveEntryBufferMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEntryBufferMethod t EntryBuffer, O.OverloadedMethod info EntryBuffer p) => OL.IsLabel t (EntryBuffer -> 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 ~ ResolveEntryBufferMethod t EntryBuffer, O.OverloadedMethod info EntryBuffer p, R.HasField t EntryBuffer p) => R.HasField t EntryBuffer p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveEntryBufferMethod t EntryBuffer, O.OverloadedMethodInfo info EntryBuffer) => OL.IsLabel t (O.MethodProxy info EntryBuffer) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type EntryBufferDeletedTextCallback =
Word32
-> Word32
-> IO ()
noEntryBufferDeletedTextCallback :: Maybe EntryBufferDeletedTextCallback
noEntryBufferDeletedTextCallback :: Maybe EntryBufferDeletedTextCallback
noEntryBufferDeletedTextCallback = Maybe EntryBufferDeletedTextCallback
forall a. Maybe a
Nothing
type C_EntryBufferDeletedTextCallback =
Ptr () ->
Word32 ->
Word32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_EntryBufferDeletedTextCallback :: C_EntryBufferDeletedTextCallback -> IO (FunPtr C_EntryBufferDeletedTextCallback)
genClosure_EntryBufferDeletedText :: MonadIO m => EntryBufferDeletedTextCallback -> m (GClosure C_EntryBufferDeletedTextCallback)
genClosure_EntryBufferDeletedText :: forall (m :: * -> *).
MonadIO m =>
EntryBufferDeletedTextCallback
-> m (GClosure C_EntryBufferDeletedTextCallback)
genClosure_EntryBufferDeletedText EntryBufferDeletedTextCallback
cb = IO (GClosure C_EntryBufferDeletedTextCallback)
-> m (GClosure C_EntryBufferDeletedTextCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_EntryBufferDeletedTextCallback)
-> m (GClosure C_EntryBufferDeletedTextCallback))
-> IO (GClosure C_EntryBufferDeletedTextCallback)
-> m (GClosure C_EntryBufferDeletedTextCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EntryBufferDeletedTextCallback
cb' = EntryBufferDeletedTextCallback -> C_EntryBufferDeletedTextCallback
wrap_EntryBufferDeletedTextCallback EntryBufferDeletedTextCallback
cb
C_EntryBufferDeletedTextCallback
-> IO (FunPtr C_EntryBufferDeletedTextCallback)
mk_EntryBufferDeletedTextCallback C_EntryBufferDeletedTextCallback
cb' IO (FunPtr C_EntryBufferDeletedTextCallback)
-> (FunPtr C_EntryBufferDeletedTextCallback
-> IO (GClosure C_EntryBufferDeletedTextCallback))
-> IO (GClosure C_EntryBufferDeletedTextCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_EntryBufferDeletedTextCallback
-> IO (GClosure C_EntryBufferDeletedTextCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_EntryBufferDeletedTextCallback ::
EntryBufferDeletedTextCallback ->
C_EntryBufferDeletedTextCallback
wrap_EntryBufferDeletedTextCallback :: EntryBufferDeletedTextCallback -> C_EntryBufferDeletedTextCallback
wrap_EntryBufferDeletedTextCallback EntryBufferDeletedTextCallback
_cb Ptr ()
_ Word32
position Word32
nChars Ptr ()
_ = do
EntryBufferDeletedTextCallback
_cb Word32
position Word32
nChars
onEntryBufferDeletedText :: (IsEntryBuffer a, MonadIO m) => a -> EntryBufferDeletedTextCallback -> m SignalHandlerId
onEntryBufferDeletedText :: forall a (m :: * -> *).
(IsEntryBuffer a, MonadIO m) =>
a -> EntryBufferDeletedTextCallback -> m SignalHandlerId
onEntryBufferDeletedText a
obj EntryBufferDeletedTextCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EntryBufferDeletedTextCallback
cb' = EntryBufferDeletedTextCallback -> C_EntryBufferDeletedTextCallback
wrap_EntryBufferDeletedTextCallback EntryBufferDeletedTextCallback
cb
FunPtr C_EntryBufferDeletedTextCallback
cb'' <- C_EntryBufferDeletedTextCallback
-> IO (FunPtr C_EntryBufferDeletedTextCallback)
mk_EntryBufferDeletedTextCallback C_EntryBufferDeletedTextCallback
cb'
a
-> Text
-> FunPtr C_EntryBufferDeletedTextCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"deleted-text" FunPtr C_EntryBufferDeletedTextCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterEntryBufferDeletedText :: (IsEntryBuffer a, MonadIO m) => a -> EntryBufferDeletedTextCallback -> m SignalHandlerId
afterEntryBufferDeletedText :: forall a (m :: * -> *).
(IsEntryBuffer a, MonadIO m) =>
a -> EntryBufferDeletedTextCallback -> m SignalHandlerId
afterEntryBufferDeletedText a
obj EntryBufferDeletedTextCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EntryBufferDeletedTextCallback
cb' = EntryBufferDeletedTextCallback -> C_EntryBufferDeletedTextCallback
wrap_EntryBufferDeletedTextCallback EntryBufferDeletedTextCallback
cb
FunPtr C_EntryBufferDeletedTextCallback
cb'' <- C_EntryBufferDeletedTextCallback
-> IO (FunPtr C_EntryBufferDeletedTextCallback)
mk_EntryBufferDeletedTextCallback C_EntryBufferDeletedTextCallback
cb'
a
-> Text
-> FunPtr C_EntryBufferDeletedTextCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"deleted-text" FunPtr C_EntryBufferDeletedTextCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data EntryBufferDeletedTextSignalInfo
instance SignalInfo EntryBufferDeletedTextSignalInfo where
type HaskellCallbackType EntryBufferDeletedTextSignalInfo = EntryBufferDeletedTextCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_EntryBufferDeletedTextCallback cb
cb'' <- mk_EntryBufferDeletedTextCallback cb'
connectSignalFunPtr obj "deleted-text" cb'' connectMode detail
#endif
type EntryBufferInsertedTextCallback =
Word32
-> T.Text
-> Word32
-> IO ()
noEntryBufferInsertedTextCallback :: Maybe EntryBufferInsertedTextCallback
noEntryBufferInsertedTextCallback :: Maybe EntryBufferInsertedTextCallback
noEntryBufferInsertedTextCallback = Maybe EntryBufferInsertedTextCallback
forall a. Maybe a
Nothing
type C_EntryBufferInsertedTextCallback =
Ptr () ->
Word32 ->
CString ->
Word32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_EntryBufferInsertedTextCallback :: C_EntryBufferInsertedTextCallback -> IO (FunPtr C_EntryBufferInsertedTextCallback)
genClosure_EntryBufferInsertedText :: MonadIO m => EntryBufferInsertedTextCallback -> m (GClosure C_EntryBufferInsertedTextCallback)
genClosure_EntryBufferInsertedText :: forall (m :: * -> *).
MonadIO m =>
EntryBufferInsertedTextCallback
-> m (GClosure C_EntryBufferInsertedTextCallback)
genClosure_EntryBufferInsertedText EntryBufferInsertedTextCallback
cb = IO (GClosure C_EntryBufferInsertedTextCallback)
-> m (GClosure C_EntryBufferInsertedTextCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_EntryBufferInsertedTextCallback)
-> m (GClosure C_EntryBufferInsertedTextCallback))
-> IO (GClosure C_EntryBufferInsertedTextCallback)
-> m (GClosure C_EntryBufferInsertedTextCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EntryBufferInsertedTextCallback
cb' = EntryBufferInsertedTextCallback
-> C_EntryBufferInsertedTextCallback
wrap_EntryBufferInsertedTextCallback EntryBufferInsertedTextCallback
cb
C_EntryBufferInsertedTextCallback
-> IO (FunPtr C_EntryBufferInsertedTextCallback)
mk_EntryBufferInsertedTextCallback C_EntryBufferInsertedTextCallback
cb' IO (FunPtr C_EntryBufferInsertedTextCallback)
-> (FunPtr C_EntryBufferInsertedTextCallback
-> IO (GClosure C_EntryBufferInsertedTextCallback))
-> IO (GClosure C_EntryBufferInsertedTextCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_EntryBufferInsertedTextCallback
-> IO (GClosure C_EntryBufferInsertedTextCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_EntryBufferInsertedTextCallback ::
EntryBufferInsertedTextCallback ->
C_EntryBufferInsertedTextCallback
wrap_EntryBufferInsertedTextCallback :: EntryBufferInsertedTextCallback
-> C_EntryBufferInsertedTextCallback
wrap_EntryBufferInsertedTextCallback EntryBufferInsertedTextCallback
_cb Ptr ()
_ Word32
position CString
chars Word32
nChars Ptr ()
_ = do
Text
chars' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
chars
EntryBufferInsertedTextCallback
_cb Word32
position Text
chars' Word32
nChars
onEntryBufferInsertedText :: (IsEntryBuffer a, MonadIO m) => a -> EntryBufferInsertedTextCallback -> m SignalHandlerId
onEntryBufferInsertedText :: forall a (m :: * -> *).
(IsEntryBuffer a, MonadIO m) =>
a -> EntryBufferInsertedTextCallback -> m SignalHandlerId
onEntryBufferInsertedText a
obj EntryBufferInsertedTextCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EntryBufferInsertedTextCallback
cb' = EntryBufferInsertedTextCallback
-> C_EntryBufferInsertedTextCallback
wrap_EntryBufferInsertedTextCallback EntryBufferInsertedTextCallback
cb
FunPtr C_EntryBufferInsertedTextCallback
cb'' <- C_EntryBufferInsertedTextCallback
-> IO (FunPtr C_EntryBufferInsertedTextCallback)
mk_EntryBufferInsertedTextCallback C_EntryBufferInsertedTextCallback
cb'
a
-> Text
-> FunPtr C_EntryBufferInsertedTextCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"inserted-text" FunPtr C_EntryBufferInsertedTextCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterEntryBufferInsertedText :: (IsEntryBuffer a, MonadIO m) => a -> EntryBufferInsertedTextCallback -> m SignalHandlerId
afterEntryBufferInsertedText :: forall a (m :: * -> *).
(IsEntryBuffer a, MonadIO m) =>
a -> EntryBufferInsertedTextCallback -> m SignalHandlerId
afterEntryBufferInsertedText a
obj EntryBufferInsertedTextCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EntryBufferInsertedTextCallback
cb' = EntryBufferInsertedTextCallback
-> C_EntryBufferInsertedTextCallback
wrap_EntryBufferInsertedTextCallback EntryBufferInsertedTextCallback
cb
FunPtr C_EntryBufferInsertedTextCallback
cb'' <- C_EntryBufferInsertedTextCallback
-> IO (FunPtr C_EntryBufferInsertedTextCallback)
mk_EntryBufferInsertedTextCallback C_EntryBufferInsertedTextCallback
cb'
a
-> Text
-> FunPtr C_EntryBufferInsertedTextCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"inserted-text" FunPtr C_EntryBufferInsertedTextCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data EntryBufferInsertedTextSignalInfo
instance SignalInfo EntryBufferInsertedTextSignalInfo where
type HaskellCallbackType EntryBufferInsertedTextSignalInfo = EntryBufferInsertedTextCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_EntryBufferInsertedTextCallback cb
cb'' <- mk_EntryBufferInsertedTextCallback cb'
connectSignalFunPtr obj "inserted-text" cb'' connectMode detail
#endif
getEntryBufferLength :: (MonadIO m, IsEntryBuffer o) => o -> m Word32
getEntryBufferLength :: forall (m :: * -> *) o.
(MonadIO m, IsEntryBuffer o) =>
o -> m Word32
getEntryBufferLength o
obj = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"length"
#if defined(ENABLE_OVERLOADING)
data EntryBufferLengthPropertyInfo
instance AttrInfo EntryBufferLengthPropertyInfo where
type AttrAllowedOps EntryBufferLengthPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint EntryBufferLengthPropertyInfo = IsEntryBuffer
type AttrSetTypeConstraint EntryBufferLengthPropertyInfo = (~) ()
type AttrTransferTypeConstraint EntryBufferLengthPropertyInfo = (~) ()
type AttrTransferType EntryBufferLengthPropertyInfo = ()
type AttrGetType EntryBufferLengthPropertyInfo = Word32
type AttrLabel EntryBufferLengthPropertyInfo = "length"
type AttrOrigin EntryBufferLengthPropertyInfo = EntryBuffer
attrGet = getEntryBufferLength
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getEntryBufferMaxLength :: (MonadIO m, IsEntryBuffer o) => o -> m Int32
getEntryBufferMaxLength :: forall (m :: * -> *) o.
(MonadIO m, IsEntryBuffer o) =>
o -> m Int32
getEntryBufferMaxLength o
obj = IO Int32 -> m Int32
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
"max-length"
setEntryBufferMaxLength :: (MonadIO m, IsEntryBuffer o) => o -> Int32 -> m ()
setEntryBufferMaxLength :: forall (m :: * -> *) o.
(MonadIO m, IsEntryBuffer o) =>
o -> Int32 -> m ()
setEntryBufferMaxLength o
obj Int32
val = IO () -> m ()
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
"max-length" Int32
val
constructEntryBufferMaxLength :: (IsEntryBuffer o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructEntryBufferMaxLength :: forall o (m :: * -> *).
(IsEntryBuffer o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructEntryBufferMaxLength Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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
"max-length" Int32
val
#if defined(ENABLE_OVERLOADING)
data EntryBufferMaxLengthPropertyInfo
instance AttrInfo EntryBufferMaxLengthPropertyInfo where
type AttrAllowedOps EntryBufferMaxLengthPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint EntryBufferMaxLengthPropertyInfo = IsEntryBuffer
type AttrSetTypeConstraint EntryBufferMaxLengthPropertyInfo = (~) Int32
type AttrTransferTypeConstraint EntryBufferMaxLengthPropertyInfo = (~) Int32
type AttrTransferType EntryBufferMaxLengthPropertyInfo = Int32
type AttrGetType EntryBufferMaxLengthPropertyInfo = Int32
type AttrLabel EntryBufferMaxLengthPropertyInfo = "max-length"
type AttrOrigin EntryBufferMaxLengthPropertyInfo = EntryBuffer
attrGet = getEntryBufferMaxLength
attrSet = setEntryBufferMaxLength
attrTransfer _ v = do
return v
attrConstruct = constructEntryBufferMaxLength
attrClear = undefined
#endif
getEntryBufferText :: (MonadIO m, IsEntryBuffer o) => o -> m T.Text
getEntryBufferText :: forall (m :: * -> *) o. (MonadIO m, IsEntryBuffer o) => o -> m Text
getEntryBufferText o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getEntryBufferText" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO 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
"text"
setEntryBufferText :: (MonadIO m, IsEntryBuffer o) => o -> T.Text -> m ()
setEntryBufferText :: forall (m :: * -> *) o.
(MonadIO m, IsEntryBuffer o) =>
o -> Text -> m ()
setEntryBufferText o
obj Text
val = IO () -> m ()
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
"text" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructEntryBufferText :: (IsEntryBuffer o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructEntryBufferText :: forall o (m :: * -> *).
(IsEntryBuffer o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructEntryBufferText Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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
"text" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearEntryBufferText :: (MonadIO m, IsEntryBuffer o) => o -> m ()
clearEntryBufferText :: forall (m :: * -> *) o. (MonadIO m, IsEntryBuffer o) => o -> m ()
clearEntryBufferText o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"text" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data EntryBufferTextPropertyInfo
instance AttrInfo EntryBufferTextPropertyInfo where
type AttrAllowedOps EntryBufferTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint EntryBufferTextPropertyInfo = IsEntryBuffer
type AttrSetTypeConstraint EntryBufferTextPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint EntryBufferTextPropertyInfo = (~) T.Text
type AttrTransferType EntryBufferTextPropertyInfo = T.Text
type AttrGetType EntryBufferTextPropertyInfo = T.Text
type AttrLabel EntryBufferTextPropertyInfo = "text"
type AttrOrigin EntryBufferTextPropertyInfo = EntryBuffer
attrGet = getEntryBufferText
attrSet = setEntryBufferText
attrTransfer _ v = do
return v
attrConstruct = constructEntryBufferText
attrClear = clearEntryBufferText
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList EntryBuffer
type instance O.AttributeList EntryBuffer = EntryBufferAttributeList
type EntryBufferAttributeList = ('[ '("length", EntryBufferLengthPropertyInfo), '("maxLength", EntryBufferMaxLengthPropertyInfo), '("text", EntryBufferTextPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
entryBufferLength :: AttrLabelProxy "length"
entryBufferLength = AttrLabelProxy
entryBufferMaxLength :: AttrLabelProxy "maxLength"
entryBufferMaxLength = AttrLabelProxy
entryBufferText :: AttrLabelProxy "text"
entryBufferText = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList EntryBuffer = EntryBufferSignalList
type EntryBufferSignalList = ('[ '("deletedText", EntryBufferDeletedTextSignalInfo), '("insertedText", EntryBufferInsertedTextSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_entry_buffer_new" gtk_entry_buffer_new ::
CString ->
Int32 ->
IO (Ptr EntryBuffer)
entryBufferNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (T.Text)
-> Int32
-> m EntryBuffer
entryBufferNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe Text -> Int32 -> m EntryBuffer
entryBufferNew Maybe Text
initialChars Int32
nInitialChars = IO EntryBuffer -> m EntryBuffer
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EntryBuffer -> m EntryBuffer)
-> IO EntryBuffer -> m EntryBuffer
forall a b. (a -> b) -> a -> b
$ do
CString
maybeInitialChars <- case Maybe Text
initialChars of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jInitialChars -> do
CString
jInitialChars' <- Text -> IO CString
textToCString Text
jInitialChars
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jInitialChars'
Ptr EntryBuffer
result <- CString -> Int32 -> IO (Ptr EntryBuffer)
gtk_entry_buffer_new CString
maybeInitialChars Int32
nInitialChars
Text -> Ptr EntryBuffer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"entryBufferNew" Ptr EntryBuffer
result
EntryBuffer
result' <- ((ManagedPtr EntryBuffer -> EntryBuffer)
-> Ptr EntryBuffer -> IO EntryBuffer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr EntryBuffer -> EntryBuffer
EntryBuffer) Ptr EntryBuffer
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeInitialChars
EntryBuffer -> IO EntryBuffer
forall (m :: * -> *) a. Monad m => a -> m a
return EntryBuffer
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_entry_buffer_delete_text" gtk_entry_buffer_delete_text ::
Ptr EntryBuffer ->
Word32 ->
Int32 ->
IO Word32
entryBufferDeleteText ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> Word32
-> Int32
-> m Word32
entryBufferDeleteText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> Word32 -> Int32 -> m Word32
entryBufferDeleteText a
buffer Word32
position Int32
nChars = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
Word32
result <- Ptr EntryBuffer -> Word32 -> Int32 -> IO Word32
gtk_entry_buffer_delete_text Ptr EntryBuffer
buffer' Word32
position Int32
nChars
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data EntryBufferDeleteTextMethodInfo
instance (signature ~ (Word32 -> Int32 -> m Word32), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferDeleteTextMethodInfo a signature where
overloadedMethod = entryBufferDeleteText
instance O.OverloadedMethodInfo EntryBufferDeleteTextMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferDeleteText",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferDeleteText"
}
#endif
foreign import ccall "gtk_entry_buffer_emit_deleted_text" gtk_entry_buffer_emit_deleted_text ::
Ptr EntryBuffer ->
Word32 ->
Word32 ->
IO ()
entryBufferEmitDeletedText ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> Word32
-> Word32
-> m ()
entryBufferEmitDeletedText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> Word32 -> Word32 -> m ()
entryBufferEmitDeletedText a
buffer Word32
position Word32
nChars = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
Ptr EntryBuffer -> EntryBufferDeletedTextCallback
gtk_entry_buffer_emit_deleted_text Ptr EntryBuffer
buffer' Word32
position Word32
nChars
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EntryBufferEmitDeletedTextMethodInfo
instance (signature ~ (Word32 -> Word32 -> m ()), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferEmitDeletedTextMethodInfo a signature where
overloadedMethod = entryBufferEmitDeletedText
instance O.OverloadedMethodInfo EntryBufferEmitDeletedTextMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferEmitDeletedText",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferEmitDeletedText"
}
#endif
foreign import ccall "gtk_entry_buffer_emit_inserted_text" gtk_entry_buffer_emit_inserted_text ::
Ptr EntryBuffer ->
Word32 ->
CString ->
Word32 ->
IO ()
entryBufferEmitInsertedText ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> Word32
-> T.Text
-> Word32
-> m ()
entryBufferEmitInsertedText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> Word32 -> Text -> Word32 -> m ()
entryBufferEmitInsertedText a
buffer Word32
position Text
chars Word32
nChars = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
CString
chars' <- Text -> IO CString
textToCString Text
chars
Ptr EntryBuffer -> Word32 -> CString -> Word32 -> IO ()
gtk_entry_buffer_emit_inserted_text Ptr EntryBuffer
buffer' Word32
position CString
chars' Word32
nChars
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
chars'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EntryBufferEmitInsertedTextMethodInfo
instance (signature ~ (Word32 -> T.Text -> Word32 -> m ()), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferEmitInsertedTextMethodInfo a signature where
overloadedMethod = entryBufferEmitInsertedText
instance O.OverloadedMethodInfo EntryBufferEmitInsertedTextMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferEmitInsertedText",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferEmitInsertedText"
}
#endif
foreign import ccall "gtk_entry_buffer_get_bytes" gtk_entry_buffer_get_bytes ::
Ptr EntryBuffer ->
IO Word64
entryBufferGetBytes ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> m Word64
entryBufferGetBytes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> m Word64
entryBufferGetBytes a
buffer = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
Word64
result <- Ptr EntryBuffer -> IO Word64
gtk_entry_buffer_get_bytes Ptr EntryBuffer
buffer'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data EntryBufferGetBytesMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferGetBytesMethodInfo a signature where
overloadedMethod = entryBufferGetBytes
instance O.OverloadedMethodInfo EntryBufferGetBytesMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferGetBytes",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferGetBytes"
}
#endif
foreign import ccall "gtk_entry_buffer_get_length" gtk_entry_buffer_get_length ::
Ptr EntryBuffer ->
IO Word32
entryBufferGetLength ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> m Word32
entryBufferGetLength :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> m Word32
entryBufferGetLength a
buffer = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
Word32
result <- Ptr EntryBuffer -> IO Word32
gtk_entry_buffer_get_length Ptr EntryBuffer
buffer'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data EntryBufferGetLengthMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferGetLengthMethodInfo a signature where
overloadedMethod = entryBufferGetLength
instance O.OverloadedMethodInfo EntryBufferGetLengthMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferGetLength",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferGetLength"
}
#endif
foreign import ccall "gtk_entry_buffer_get_max_length" gtk_entry_buffer_get_max_length ::
Ptr EntryBuffer ->
IO Int32
entryBufferGetMaxLength ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> m Int32
entryBufferGetMaxLength :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> m Int32
entryBufferGetMaxLength a
buffer = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
Int32
result <- Ptr EntryBuffer -> IO Int32
gtk_entry_buffer_get_max_length Ptr EntryBuffer
buffer'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data EntryBufferGetMaxLengthMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferGetMaxLengthMethodInfo a signature where
overloadedMethod = entryBufferGetMaxLength
instance O.OverloadedMethodInfo EntryBufferGetMaxLengthMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferGetMaxLength",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferGetMaxLength"
}
#endif
foreign import ccall "gtk_entry_buffer_get_text" gtk_entry_buffer_get_text ::
Ptr EntryBuffer ->
IO CString
entryBufferGetText ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> m T.Text
entryBufferGetText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> m Text
entryBufferGetText a
buffer = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
CString
result <- Ptr EntryBuffer -> IO CString
gtk_entry_buffer_get_text Ptr EntryBuffer
buffer'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"entryBufferGetText" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data EntryBufferGetTextMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferGetTextMethodInfo a signature where
overloadedMethod = entryBufferGetText
instance O.OverloadedMethodInfo EntryBufferGetTextMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferGetText",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferGetText"
}
#endif
foreign import ccall "gtk_entry_buffer_insert_text" gtk_entry_buffer_insert_text ::
Ptr EntryBuffer ->
Word32 ->
CString ->
Int32 ->
IO Word32
entryBufferInsertText ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> Word32
-> T.Text
-> Int32
-> m Word32
entryBufferInsertText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> Word32 -> Text -> Int32 -> m Word32
entryBufferInsertText a
buffer Word32
position Text
chars Int32
nChars = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
CString
chars' <- Text -> IO CString
textToCString Text
chars
Word32
result <- Ptr EntryBuffer -> Word32 -> CString -> Int32 -> IO Word32
gtk_entry_buffer_insert_text Ptr EntryBuffer
buffer' Word32
position CString
chars' Int32
nChars
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
chars'
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data EntryBufferInsertTextMethodInfo
instance (signature ~ (Word32 -> T.Text -> Int32 -> m Word32), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferInsertTextMethodInfo a signature where
overloadedMethod = entryBufferInsertText
instance O.OverloadedMethodInfo EntryBufferInsertTextMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferInsertText",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferInsertText"
}
#endif
foreign import ccall "gtk_entry_buffer_set_max_length" gtk_entry_buffer_set_max_length ::
Ptr EntryBuffer ->
Int32 ->
IO ()
entryBufferSetMaxLength ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> Int32
-> m ()
entryBufferSetMaxLength :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> Int32 -> m ()
entryBufferSetMaxLength a
buffer Int32
maxLength = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
Ptr EntryBuffer -> Int32 -> IO ()
gtk_entry_buffer_set_max_length Ptr EntryBuffer
buffer' Int32
maxLength
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EntryBufferSetMaxLengthMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferSetMaxLengthMethodInfo a signature where
overloadedMethod = entryBufferSetMaxLength
instance O.OverloadedMethodInfo EntryBufferSetMaxLengthMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferSetMaxLength",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferSetMaxLength"
}
#endif
foreign import ccall "gtk_entry_buffer_set_text" gtk_entry_buffer_set_text ::
Ptr EntryBuffer ->
CString ->
Int32 ->
IO ()
entryBufferSetText ::
(B.CallStack.HasCallStack, MonadIO m, IsEntryBuffer a) =>
a
-> T.Text
-> Int32
-> m ()
entryBufferSetText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEntryBuffer a) =>
a -> Text -> Int32 -> m ()
entryBufferSetText a
buffer Text
chars Int32
nChars = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EntryBuffer
buffer' <- a -> IO (Ptr EntryBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
CString
chars' <- Text -> IO CString
textToCString Text
chars
Ptr EntryBuffer -> CString -> Int32 -> IO ()
gtk_entry_buffer_set_text Ptr EntryBuffer
buffer' CString
chars' Int32
nChars
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
chars'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EntryBufferSetTextMethodInfo
instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsEntryBuffer a) => O.OverloadedMethod EntryBufferSetTextMethodInfo a signature where
overloadedMethod = entryBufferSetText
instance O.OverloadedMethodInfo EntryBufferSetTextMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EntryBuffer.entryBufferSetText",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-EntryBuffer.html#v:entryBufferSetText"
}
#endif