{-# 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 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
instance B.GValue.IsGValue EntryBuffer where
toGValue :: EntryBuffer -> IO GValue
toGValue EntryBuffer
o = do
GType
gtype <- IO GType
c_gtk_entry_buffer_get_type
EntryBuffer -> (Ptr EntryBuffer -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr EntryBuffer
o (GType
-> (GValue -> Ptr EntryBuffer -> IO ())
-> Ptr EntryBuffer
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr EntryBuffer -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO EntryBuffer
fromGValue GValue
gv = do
Ptr EntryBuffer
ptr <- GValue -> IO (Ptr EntryBuffer)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr EntryBuffer)
(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
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 :: (MonadIO m, IsEntryBuffer o) => o -> m EntryBuffer
toEntryBuffer :: o -> m EntryBuffer
toEntryBuffer = IO EntryBuffer -> m EntryBuffer
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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'
unsafeCastTo ManagedPtr EntryBuffer -> EntryBuffer
EntryBuffer
#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.MethodInfo 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
#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 :: 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 :: 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 :: 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 :: 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 :: 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 :: 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 :: o -> m Word32
getEntryBufferLength o
obj = 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
$ 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 :: o -> m Int32
getEntryBufferMaxLength o
obj = 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
$ 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 :: o -> Int32 -> m ()
setEntryBufferMaxLength o
obj Int32
val = 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 -> 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 :: 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
$ 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 :: o -> m Text
getEntryBufferText o
obj = 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
$ 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 :: o -> Text -> m ()
setEntryBufferText o
obj Text
val = 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" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructEntryBufferText :: (IsEntryBuffer o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructEntryBufferText :: 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
$ 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 :: 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 :: 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 :: 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.MethodInfo EntryBufferDeleteTextMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo EntryBufferEmitDeletedTextMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo EntryBufferEmitInsertedTextMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo EntryBufferGetBytesMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo EntryBufferGetLengthMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo EntryBufferGetMaxLengthMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo EntryBufferGetTextMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo EntryBufferInsertTextMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo EntryBufferSetMaxLengthMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo EntryBufferSetTextMethodInfo a signature where
overloadedMethod = entryBufferSetText
#endif