#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Objects.EntryBuffer
(
EntryBuffer(..) ,
IsEntryBuffer ,
toEntryBuffer ,
noEntryBuffer ,
#if ENABLE_OVERLOADING
EntryBufferDeleteTextMethodInfo ,
#endif
entryBufferDeleteText ,
#if ENABLE_OVERLOADING
EntryBufferEmitDeletedTextMethodInfo ,
#endif
entryBufferEmitDeletedText ,
#if ENABLE_OVERLOADING
EntryBufferEmitInsertedTextMethodInfo ,
#endif
entryBufferEmitInsertedText ,
#if ENABLE_OVERLOADING
EntryBufferGetBytesMethodInfo ,
#endif
entryBufferGetBytes ,
#if ENABLE_OVERLOADING
EntryBufferGetLengthMethodInfo ,
#endif
entryBufferGetLength ,
#if ENABLE_OVERLOADING
EntryBufferGetMaxLengthMethodInfo ,
#endif
entryBufferGetMaxLength ,
#if ENABLE_OVERLOADING
EntryBufferGetTextMethodInfo ,
#endif
entryBufferGetText ,
#if ENABLE_OVERLOADING
EntryBufferInsertTextMethodInfo ,
#endif
entryBufferInsertText ,
entryBufferNew ,
#if ENABLE_OVERLOADING
EntryBufferSetMaxLengthMethodInfo ,
#endif
entryBufferSetMaxLength ,
#if ENABLE_OVERLOADING
EntryBufferSetTextMethodInfo ,
#endif
entryBufferSetText ,
#if ENABLE_OVERLOADING
EntryBufferLengthPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
entryBufferLength ,
#endif
getEntryBufferLength ,
#if ENABLE_OVERLOADING
EntryBufferMaxLengthPropertyInfo ,
#endif
constructEntryBufferMaxLength ,
#if ENABLE_OVERLOADING
entryBufferMaxLength ,
#endif
getEntryBufferMaxLength ,
setEntryBufferMaxLength ,
#if ENABLE_OVERLOADING
EntryBufferTextPropertyInfo ,
#endif
clearEntryBufferText ,
constructEntryBufferText ,
#if ENABLE_OVERLOADING
entryBufferText ,
#endif
getEntryBufferText ,
setEntryBufferText ,
C_EntryBufferDeletedTextCallback ,
EntryBufferDeletedTextCallback ,
#if ENABLE_OVERLOADING
EntryBufferDeletedTextSignalInfo ,
#endif
afterEntryBufferDeletedText ,
genClosure_EntryBufferDeletedText ,
mk_EntryBufferDeletedTextCallback ,
noEntryBufferDeletedTextCallback ,
onEntryBufferDeletedText ,
wrap_EntryBufferDeletedTextCallback ,
C_EntryBufferInsertedTextCallback ,
EntryBufferInsertedTextCallback ,
#if 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
newtype EntryBuffer = EntryBuffer (ManagedPtr EntryBuffer)
foreign import ccall "gtk_entry_buffer_get_type"
c_gtk_entry_buffer_get_type :: IO GType
instance GObject EntryBuffer where
gobjectType = c_gtk_entry_buffer_get_type
class (GObject o, O.IsDescendantOf EntryBuffer o) => IsEntryBuffer o
instance (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 = liftIO . unsafeCastTo EntryBuffer
noEntryBuffer :: Maybe EntryBuffer
noEntryBuffer = Nothing
#if 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 (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
type EntryBufferDeletedTextCallback =
Word32
-> Word32
-> IO ()
noEntryBufferDeletedTextCallback :: Maybe EntryBufferDeletedTextCallback
noEntryBufferDeletedTextCallback = 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 cb = liftIO $ do
let cb' = wrap_EntryBufferDeletedTextCallback cb
mk_EntryBufferDeletedTextCallback cb' >>= B.GClosure.newGClosure
wrap_EntryBufferDeletedTextCallback ::
EntryBufferDeletedTextCallback ->
C_EntryBufferDeletedTextCallback
wrap_EntryBufferDeletedTextCallback _cb _ position nChars _ = do
_cb position nChars
onEntryBufferDeletedText :: (IsEntryBuffer a, MonadIO m) => a -> EntryBufferDeletedTextCallback -> m SignalHandlerId
onEntryBufferDeletedText obj cb = liftIO $ do
let cb' = wrap_EntryBufferDeletedTextCallback cb
cb'' <- mk_EntryBufferDeletedTextCallback cb'
connectSignalFunPtr obj "deleted-text" cb'' SignalConnectBefore
afterEntryBufferDeletedText :: (IsEntryBuffer a, MonadIO m) => a -> EntryBufferDeletedTextCallback -> m SignalHandlerId
afterEntryBufferDeletedText obj cb = liftIO $ do
let cb' = wrap_EntryBufferDeletedTextCallback cb
cb'' <- mk_EntryBufferDeletedTextCallback cb'
connectSignalFunPtr obj "deleted-text" cb'' SignalConnectAfter
type EntryBufferInsertedTextCallback =
Word32
-> T.Text
-> Word32
-> IO ()
noEntryBufferInsertedTextCallback :: Maybe EntryBufferInsertedTextCallback
noEntryBufferInsertedTextCallback = 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 cb = liftIO $ do
let cb' = wrap_EntryBufferInsertedTextCallback cb
mk_EntryBufferInsertedTextCallback cb' >>= B.GClosure.newGClosure
wrap_EntryBufferInsertedTextCallback ::
EntryBufferInsertedTextCallback ->
C_EntryBufferInsertedTextCallback
wrap_EntryBufferInsertedTextCallback _cb _ position chars nChars _ = do
chars' <- cstringToText chars
_cb position chars' nChars
onEntryBufferInsertedText :: (IsEntryBuffer a, MonadIO m) => a -> EntryBufferInsertedTextCallback -> m SignalHandlerId
onEntryBufferInsertedText obj cb = liftIO $ do
let cb' = wrap_EntryBufferInsertedTextCallback cb
cb'' <- mk_EntryBufferInsertedTextCallback cb'
connectSignalFunPtr obj "inserted-text" cb'' SignalConnectBefore
afterEntryBufferInsertedText :: (IsEntryBuffer a, MonadIO m) => a -> EntryBufferInsertedTextCallback -> m SignalHandlerId
afterEntryBufferInsertedText obj cb = liftIO $ do
let cb' = wrap_EntryBufferInsertedTextCallback cb
cb'' <- mk_EntryBufferInsertedTextCallback cb'
connectSignalFunPtr obj "inserted-text" cb'' SignalConnectAfter
getEntryBufferLength :: (MonadIO m, IsEntryBuffer o) => o -> m Word32
getEntryBufferLength obj = liftIO $ B.Properties.getObjectPropertyUInt32 obj "length"
#if ENABLE_OVERLOADING
data EntryBufferLengthPropertyInfo
instance AttrInfo EntryBufferLengthPropertyInfo where
type AttrAllowedOps EntryBufferLengthPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EntryBufferLengthPropertyInfo = (~) ()
type AttrBaseTypeConstraint EntryBufferLengthPropertyInfo = IsEntryBuffer
type AttrGetType EntryBufferLengthPropertyInfo = Word32
type AttrLabel EntryBufferLengthPropertyInfo = "length"
type AttrOrigin EntryBufferLengthPropertyInfo = EntryBuffer
attrGet _ = getEntryBufferLength
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getEntryBufferMaxLength :: (MonadIO m, IsEntryBuffer o) => o -> m Int32
getEntryBufferMaxLength obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "max-length"
setEntryBufferMaxLength :: (MonadIO m, IsEntryBuffer o) => o -> Int32 -> m ()
setEntryBufferMaxLength obj val = liftIO $ B.Properties.setObjectPropertyInt32 obj "max-length" val
constructEntryBufferMaxLength :: (IsEntryBuffer o) => Int32 -> IO (GValueConstruct o)
constructEntryBufferMaxLength val = B.Properties.constructObjectPropertyInt32 "max-length" val
#if ENABLE_OVERLOADING
data EntryBufferMaxLengthPropertyInfo
instance AttrInfo EntryBufferMaxLengthPropertyInfo where
type AttrAllowedOps EntryBufferMaxLengthPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint EntryBufferMaxLengthPropertyInfo = (~) Int32
type AttrBaseTypeConstraint EntryBufferMaxLengthPropertyInfo = IsEntryBuffer
type AttrGetType EntryBufferMaxLengthPropertyInfo = Int32
type AttrLabel EntryBufferMaxLengthPropertyInfo = "max-length"
type AttrOrigin EntryBufferMaxLengthPropertyInfo = EntryBuffer
attrGet _ = getEntryBufferMaxLength
attrSet _ = setEntryBufferMaxLength
attrConstruct _ = constructEntryBufferMaxLength
attrClear _ = undefined
#endif
getEntryBufferText :: (MonadIO m, IsEntryBuffer o) => o -> m T.Text
getEntryBufferText obj = liftIO $ checkUnexpectedNothing "getEntryBufferText" $ B.Properties.getObjectPropertyString obj "text"
setEntryBufferText :: (MonadIO m, IsEntryBuffer o) => o -> T.Text -> m ()
setEntryBufferText obj val = liftIO $ B.Properties.setObjectPropertyString obj "text" (Just val)
constructEntryBufferText :: (IsEntryBuffer o) => T.Text -> IO (GValueConstruct o)
constructEntryBufferText val = B.Properties.constructObjectPropertyString "text" (Just val)
clearEntryBufferText :: (MonadIO m, IsEntryBuffer o) => o -> m ()
clearEntryBufferText obj = liftIO $ B.Properties.setObjectPropertyString obj "text" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data EntryBufferTextPropertyInfo
instance AttrInfo EntryBufferTextPropertyInfo where
type AttrAllowedOps EntryBufferTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EntryBufferTextPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint EntryBufferTextPropertyInfo = IsEntryBuffer
type AttrGetType EntryBufferTextPropertyInfo = T.Text
type AttrLabel EntryBufferTextPropertyInfo = "text"
type AttrOrigin EntryBufferTextPropertyInfo = EntryBuffer
attrGet _ = getEntryBufferText
attrSet _ = setEntryBufferText
attrConstruct _ = constructEntryBufferText
attrClear _ = clearEntryBufferText
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList EntryBuffer
type instance O.AttributeList EntryBuffer = EntryBufferAttributeList
type EntryBufferAttributeList = ('[ '("length", EntryBufferLengthPropertyInfo), '("maxLength", EntryBufferMaxLengthPropertyInfo), '("text", EntryBufferTextPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
entryBufferLength :: AttrLabelProxy "length"
entryBufferLength = AttrLabelProxy
entryBufferMaxLength :: AttrLabelProxy "maxLength"
entryBufferMaxLength = AttrLabelProxy
entryBufferText :: AttrLabelProxy "text"
entryBufferText = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data EntryBufferDeletedTextSignalInfo
instance SignalInfo EntryBufferDeletedTextSignalInfo where
type HaskellCallbackType EntryBufferDeletedTextSignalInfo = EntryBufferDeletedTextCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_EntryBufferDeletedTextCallback cb
cb'' <- mk_EntryBufferDeletedTextCallback cb'
connectSignalFunPtr obj "deleted-text" cb'' connectMode
data EntryBufferInsertedTextSignalInfo
instance SignalInfo EntryBufferInsertedTextSignalInfo where
type HaskellCallbackType EntryBufferInsertedTextSignalInfo = EntryBufferInsertedTextCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_EntryBufferInsertedTextCallback cb
cb'' <- mk_EntryBufferInsertedTextCallback cb'
connectSignalFunPtr obj "inserted-text" cb'' connectMode
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 initialChars nInitialChars = liftIO $ do
maybeInitialChars <- case initialChars of
Nothing -> return nullPtr
Just jInitialChars -> do
jInitialChars' <- textToCString jInitialChars
return jInitialChars'
result <- gtk_entry_buffer_new maybeInitialChars nInitialChars
checkUnexpectedReturnNULL "entryBufferNew" result
result' <- (wrapObject EntryBuffer) result
freeMem maybeInitialChars
return result'
#if 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 buffer position nChars = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
result <- gtk_entry_buffer_delete_text buffer' position nChars
touchManagedPtr buffer
return result
#if 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 buffer position nChars = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
gtk_entry_buffer_emit_deleted_text buffer' position nChars
touchManagedPtr buffer
return ()
#if 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 buffer position chars nChars = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
chars' <- textToCString chars
gtk_entry_buffer_emit_inserted_text buffer' position chars' nChars
touchManagedPtr buffer
freeMem chars'
return ()
#if 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 buffer = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
result <- gtk_entry_buffer_get_bytes buffer'
touchManagedPtr buffer
return result
#if 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 buffer = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
result <- gtk_entry_buffer_get_length buffer'
touchManagedPtr buffer
return result
#if 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 buffer = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
result <- gtk_entry_buffer_get_max_length buffer'
touchManagedPtr buffer
return result
#if 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 buffer = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
result <- gtk_entry_buffer_get_text buffer'
checkUnexpectedReturnNULL "entryBufferGetText" result
result' <- cstringToText result
touchManagedPtr buffer
return result'
#if 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 buffer position chars nChars = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
chars' <- textToCString chars
result <- gtk_entry_buffer_insert_text buffer' position chars' nChars
touchManagedPtr buffer
freeMem chars'
return result
#if 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 buffer maxLength = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
gtk_entry_buffer_set_max_length buffer' maxLength
touchManagedPtr buffer
return ()
#if 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 buffer chars nChars = liftIO $ do
buffer' <- unsafeManagedPtrCastPtr buffer
chars' <- textToCString chars
gtk_entry_buffer_set_text buffer' chars' nChars
touchManagedPtr buffer
freeMem chars'
return ()
#if ENABLE_OVERLOADING
data EntryBufferSetTextMethodInfo
instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsEntryBuffer a) => O.MethodInfo EntryBufferSetTextMethodInfo a signature where
overloadedMethod _ = entryBufferSetText
#endif