{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Interfaces.Editable
(
Editable(..) ,
noEditable ,
IsEditable ,
toEditable ,
#if defined(ENABLE_OVERLOADING)
ResolveEditableMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
EditableCopyClipboardMethodInfo ,
#endif
editableCopyClipboard ,
#if defined(ENABLE_OVERLOADING)
EditableCutClipboardMethodInfo ,
#endif
editableCutClipboard ,
#if defined(ENABLE_OVERLOADING)
EditableDeleteSelectionMethodInfo ,
#endif
editableDeleteSelection ,
#if defined(ENABLE_OVERLOADING)
EditableDeleteTextMethodInfo ,
#endif
editableDeleteText ,
#if defined(ENABLE_OVERLOADING)
EditableGetCharsMethodInfo ,
#endif
editableGetChars ,
#if defined(ENABLE_OVERLOADING)
EditableGetEditableMethodInfo ,
#endif
editableGetEditable ,
#if defined(ENABLE_OVERLOADING)
EditableGetPositionMethodInfo ,
#endif
editableGetPosition ,
#if defined(ENABLE_OVERLOADING)
EditableGetSelectionBoundsMethodInfo ,
#endif
editableGetSelectionBounds ,
#if defined(ENABLE_OVERLOADING)
EditableInsertTextMethodInfo ,
#endif
editableInsertText ,
#if defined(ENABLE_OVERLOADING)
EditablePasteClipboardMethodInfo ,
#endif
editablePasteClipboard ,
#if defined(ENABLE_OVERLOADING)
EditableSelectRegionMethodInfo ,
#endif
editableSelectRegion ,
#if defined(ENABLE_OVERLOADING)
EditableSetEditableMethodInfo ,
#endif
editableSetEditable ,
#if defined(ENABLE_OVERLOADING)
EditableSetPositionMethodInfo ,
#endif
editableSetPosition ,
C_EditableChangedCallback ,
EditableChangedCallback ,
#if defined(ENABLE_OVERLOADING)
EditableChangedSignalInfo ,
#endif
afterEditableChanged ,
genClosure_EditableChanged ,
mk_EditableChangedCallback ,
noEditableChangedCallback ,
onEditableChanged ,
wrap_EditableChangedCallback ,
C_EditableDeleteTextCallback ,
EditableDeleteTextCallback ,
#if defined(ENABLE_OVERLOADING)
EditableDeleteTextSignalInfo ,
#endif
afterEditableDeleteText ,
genClosure_EditableDeleteText ,
mk_EditableDeleteTextCallback ,
noEditableDeleteTextCallback ,
onEditableDeleteText ,
wrap_EditableDeleteTextCallback ,
C_EditableInsertTextCallback ,
EditableInsertTextCallback ,
#if defined(ENABLE_OVERLOADING)
EditableInsertTextSignalInfo ,
#endif
afterEditableInsertText ,
genClosure_EditableInsertText ,
mk_EditableInsertTextCallback ,
noEditableInsertTextCallback ,
onEditableInsertText ,
wrap_EditableInsertTextCallback ,
) 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.GI.Base.Signals as B.Signals
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 Editable = Editable (ManagedPtr Editable)
deriving (Editable -> Editable -> Bool
(Editable -> Editable -> Bool)
-> (Editable -> Editable -> Bool) -> Eq Editable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Editable -> Editable -> Bool
$c/= :: Editable -> Editable -> Bool
== :: Editable -> Editable -> Bool
$c== :: Editable -> Editable -> Bool
Eq)
noEditable :: Maybe Editable
noEditable :: Maybe Editable
noEditable = Maybe Editable
forall a. Maybe a
Nothing
type EditableChangedCallback =
IO ()
noEditableChangedCallback :: Maybe EditableChangedCallback
noEditableChangedCallback :: Maybe EditableChangedCallback
noEditableChangedCallback = Maybe EditableChangedCallback
forall a. Maybe a
Nothing
type C_EditableChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_EditableChangedCallback :: C_EditableChangedCallback -> IO (FunPtr C_EditableChangedCallback)
genClosure_EditableChanged :: MonadIO m => EditableChangedCallback -> m (GClosure C_EditableChangedCallback)
genClosure_EditableChanged :: EditableChangedCallback -> m (GClosure C_EditableChangedCallback)
genClosure_EditableChanged cb :: EditableChangedCallback
cb = IO (GClosure C_EditableChangedCallback)
-> m (GClosure C_EditableChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_EditableChangedCallback)
-> m (GClosure C_EditableChangedCallback))
-> IO (GClosure C_EditableChangedCallback)
-> m (GClosure C_EditableChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EditableChangedCallback
cb' = EditableChangedCallback -> C_EditableChangedCallback
wrap_EditableChangedCallback EditableChangedCallback
cb
C_EditableChangedCallback -> IO (FunPtr C_EditableChangedCallback)
mk_EditableChangedCallback C_EditableChangedCallback
cb' IO (FunPtr C_EditableChangedCallback)
-> (FunPtr C_EditableChangedCallback
-> IO (GClosure C_EditableChangedCallback))
-> IO (GClosure C_EditableChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_EditableChangedCallback
-> IO (GClosure C_EditableChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_EditableChangedCallback ::
EditableChangedCallback ->
C_EditableChangedCallback
wrap_EditableChangedCallback :: EditableChangedCallback -> C_EditableChangedCallback
wrap_EditableChangedCallback _cb :: EditableChangedCallback
_cb _ _ = do
EditableChangedCallback
_cb
onEditableChanged :: (IsEditable a, MonadIO m) => a -> EditableChangedCallback -> m SignalHandlerId
onEditableChanged :: a -> EditableChangedCallback -> m SignalHandlerId
onEditableChanged obj :: a
obj cb :: EditableChangedCallback
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_EditableChangedCallback
cb' = EditableChangedCallback -> C_EditableChangedCallback
wrap_EditableChangedCallback EditableChangedCallback
cb
FunPtr C_EditableChangedCallback
cb'' <- C_EditableChangedCallback -> IO (FunPtr C_EditableChangedCallback)
mk_EditableChangedCallback C_EditableChangedCallback
cb'
a
-> Text
-> FunPtr C_EditableChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "changed" FunPtr C_EditableChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterEditableChanged :: (IsEditable a, MonadIO m) => a -> EditableChangedCallback -> m SignalHandlerId
afterEditableChanged :: a -> EditableChangedCallback -> m SignalHandlerId
afterEditableChanged obj :: a
obj cb :: EditableChangedCallback
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_EditableChangedCallback
cb' = EditableChangedCallback -> C_EditableChangedCallback
wrap_EditableChangedCallback EditableChangedCallback
cb
FunPtr C_EditableChangedCallback
cb'' <- C_EditableChangedCallback -> IO (FunPtr C_EditableChangedCallback)
mk_EditableChangedCallback C_EditableChangedCallback
cb'
a
-> Text
-> FunPtr C_EditableChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "changed" FunPtr C_EditableChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data EditableChangedSignalInfo
instance SignalInfo EditableChangedSignalInfo where
type HaskellCallbackType EditableChangedSignalInfo = EditableChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_EditableChangedCallback cb
cb'' <- mk_EditableChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode detail
#endif
type EditableDeleteTextCallback =
Int32
-> Int32
-> IO ()
noEditableDeleteTextCallback :: Maybe EditableDeleteTextCallback
noEditableDeleteTextCallback :: Maybe EditableDeleteTextCallback
noEditableDeleteTextCallback = Maybe EditableDeleteTextCallback
forall a. Maybe a
Nothing
type C_EditableDeleteTextCallback =
Ptr () ->
Int32 ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_EditableDeleteTextCallback :: C_EditableDeleteTextCallback -> IO (FunPtr C_EditableDeleteTextCallback)
genClosure_EditableDeleteText :: MonadIO m => EditableDeleteTextCallback -> m (GClosure C_EditableDeleteTextCallback)
genClosure_EditableDeleteText :: EditableDeleteTextCallback
-> m (GClosure C_EditableDeleteTextCallback)
genClosure_EditableDeleteText cb :: EditableDeleteTextCallback
cb = IO (GClosure C_EditableDeleteTextCallback)
-> m (GClosure C_EditableDeleteTextCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_EditableDeleteTextCallback)
-> m (GClosure C_EditableDeleteTextCallback))
-> IO (GClosure C_EditableDeleteTextCallback)
-> m (GClosure C_EditableDeleteTextCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EditableDeleteTextCallback
cb' = EditableDeleteTextCallback -> C_EditableDeleteTextCallback
wrap_EditableDeleteTextCallback EditableDeleteTextCallback
cb
C_EditableDeleteTextCallback
-> IO (FunPtr C_EditableDeleteTextCallback)
mk_EditableDeleteTextCallback C_EditableDeleteTextCallback
cb' IO (FunPtr C_EditableDeleteTextCallback)
-> (FunPtr C_EditableDeleteTextCallback
-> IO (GClosure C_EditableDeleteTextCallback))
-> IO (GClosure C_EditableDeleteTextCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_EditableDeleteTextCallback
-> IO (GClosure C_EditableDeleteTextCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_EditableDeleteTextCallback ::
EditableDeleteTextCallback ->
C_EditableDeleteTextCallback
wrap_EditableDeleteTextCallback :: EditableDeleteTextCallback -> C_EditableDeleteTextCallback
wrap_EditableDeleteTextCallback _cb :: EditableDeleteTextCallback
_cb _ startPos :: Int32
startPos endPos :: Int32
endPos _ = do
EditableDeleteTextCallback
_cb Int32
startPos Int32
endPos
onEditableDeleteText :: (IsEditable a, MonadIO m) => a -> EditableDeleteTextCallback -> m SignalHandlerId
onEditableDeleteText :: a -> EditableDeleteTextCallback -> m SignalHandlerId
onEditableDeleteText obj :: a
obj cb :: EditableDeleteTextCallback
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_EditableDeleteTextCallback
cb' = EditableDeleteTextCallback -> C_EditableDeleteTextCallback
wrap_EditableDeleteTextCallback EditableDeleteTextCallback
cb
FunPtr C_EditableDeleteTextCallback
cb'' <- C_EditableDeleteTextCallback
-> IO (FunPtr C_EditableDeleteTextCallback)
mk_EditableDeleteTextCallback C_EditableDeleteTextCallback
cb'
a
-> Text
-> FunPtr C_EditableDeleteTextCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "delete-text" FunPtr C_EditableDeleteTextCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterEditableDeleteText :: (IsEditable a, MonadIO m) => a -> EditableDeleteTextCallback -> m SignalHandlerId
afterEditableDeleteText :: a -> EditableDeleteTextCallback -> m SignalHandlerId
afterEditableDeleteText obj :: a
obj cb :: EditableDeleteTextCallback
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_EditableDeleteTextCallback
cb' = EditableDeleteTextCallback -> C_EditableDeleteTextCallback
wrap_EditableDeleteTextCallback EditableDeleteTextCallback
cb
FunPtr C_EditableDeleteTextCallback
cb'' <- C_EditableDeleteTextCallback
-> IO (FunPtr C_EditableDeleteTextCallback)
mk_EditableDeleteTextCallback C_EditableDeleteTextCallback
cb'
a
-> Text
-> FunPtr C_EditableDeleteTextCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "delete-text" FunPtr C_EditableDeleteTextCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data EditableDeleteTextSignalInfo
instance SignalInfo EditableDeleteTextSignalInfo where
type HaskellCallbackType EditableDeleteTextSignalInfo = EditableDeleteTextCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_EditableDeleteTextCallback cb
cb'' <- mk_EditableDeleteTextCallback cb'
connectSignalFunPtr obj "delete-text" cb'' connectMode detail
#endif
type EditableInsertTextCallback =
T.Text
-> Int32
-> Int32
-> IO (Int32)
noEditableInsertTextCallback :: Maybe EditableInsertTextCallback
noEditableInsertTextCallback :: Maybe EditableInsertTextCallback
noEditableInsertTextCallback = Maybe EditableInsertTextCallback
forall a. Maybe a
Nothing
type C_EditableInsertTextCallback =
Ptr () ->
CString ->
Int32 ->
Ptr Int32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_EditableInsertTextCallback :: C_EditableInsertTextCallback -> IO (FunPtr C_EditableInsertTextCallback)
genClosure_EditableInsertText :: MonadIO m => EditableInsertTextCallback -> m (GClosure C_EditableInsertTextCallback)
genClosure_EditableInsertText :: EditableInsertTextCallback
-> m (GClosure C_EditableInsertTextCallback)
genClosure_EditableInsertText cb :: EditableInsertTextCallback
cb = IO (GClosure C_EditableInsertTextCallback)
-> m (GClosure C_EditableInsertTextCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_EditableInsertTextCallback)
-> m (GClosure C_EditableInsertTextCallback))
-> IO (GClosure C_EditableInsertTextCallback)
-> m (GClosure C_EditableInsertTextCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EditableInsertTextCallback
cb' = EditableInsertTextCallback -> C_EditableInsertTextCallback
wrap_EditableInsertTextCallback EditableInsertTextCallback
cb
C_EditableInsertTextCallback
-> IO (FunPtr C_EditableInsertTextCallback)
mk_EditableInsertTextCallback C_EditableInsertTextCallback
cb' IO (FunPtr C_EditableInsertTextCallback)
-> (FunPtr C_EditableInsertTextCallback
-> IO (GClosure C_EditableInsertTextCallback))
-> IO (GClosure C_EditableInsertTextCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_EditableInsertTextCallback
-> IO (GClosure C_EditableInsertTextCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_EditableInsertTextCallback ::
EditableInsertTextCallback ->
C_EditableInsertTextCallback
wrap_EditableInsertTextCallback :: EditableInsertTextCallback -> C_EditableInsertTextCallback
wrap_EditableInsertTextCallback _cb :: EditableInsertTextCallback
_cb _ newText :: CString
newText newTextLength :: Int32
newTextLength position :: Ptr Int32
position _ = do
Text
newText' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
newText
Int32
position' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
position
Int32
outposition <- EditableInsertTextCallback
_cb Text
newText' Int32
newTextLength Int32
position'
Ptr Int32 -> Int32 -> EditableChangedCallback
forall a. Storable a => Ptr a -> a -> EditableChangedCallback
poke Ptr Int32
position Int32
outposition
onEditableInsertText :: (IsEditable a, MonadIO m) => a -> EditableInsertTextCallback -> m SignalHandlerId
onEditableInsertText :: a -> EditableInsertTextCallback -> m SignalHandlerId
onEditableInsertText obj :: a
obj cb :: EditableInsertTextCallback
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_EditableInsertTextCallback
cb' = EditableInsertTextCallback -> C_EditableInsertTextCallback
wrap_EditableInsertTextCallback EditableInsertTextCallback
cb
FunPtr C_EditableInsertTextCallback
cb'' <- C_EditableInsertTextCallback
-> IO (FunPtr C_EditableInsertTextCallback)
mk_EditableInsertTextCallback C_EditableInsertTextCallback
cb'
a
-> Text
-> FunPtr C_EditableInsertTextCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "insert-text" FunPtr C_EditableInsertTextCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterEditableInsertText :: (IsEditable a, MonadIO m) => a -> EditableInsertTextCallback -> m SignalHandlerId
afterEditableInsertText :: a -> EditableInsertTextCallback -> m SignalHandlerId
afterEditableInsertText obj :: a
obj cb :: EditableInsertTextCallback
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_EditableInsertTextCallback
cb' = EditableInsertTextCallback -> C_EditableInsertTextCallback
wrap_EditableInsertTextCallback EditableInsertTextCallback
cb
FunPtr C_EditableInsertTextCallback
cb'' <- C_EditableInsertTextCallback
-> IO (FunPtr C_EditableInsertTextCallback)
mk_EditableInsertTextCallback C_EditableInsertTextCallback
cb'
a
-> Text
-> FunPtr C_EditableInsertTextCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "insert-text" FunPtr C_EditableInsertTextCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data EditableInsertTextSignalInfo
instance SignalInfo EditableInsertTextSignalInfo where
type HaskellCallbackType EditableInsertTextSignalInfo = EditableInsertTextCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_EditableInsertTextCallback cb
cb'' <- mk_EditableInsertTextCallback cb'
connectSignalFunPtr obj "insert-text" cb'' connectMode detail
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Editable = EditableSignalList
type EditableSignalList = ('[ '("changed", EditableChangedSignalInfo), '("deleteText", EditableDeleteTextSignalInfo), '("insertText", EditableInsertTextSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_editable_get_type"
c_gtk_editable_get_type :: IO GType
instance GObject Editable where
gobjectType :: IO GType
gobjectType = IO GType
c_gtk_editable_get_type
instance B.GValue.IsGValue Editable where
toGValue :: Editable -> IO GValue
toGValue o :: Editable
o = do
GType
gtype <- IO GType
c_gtk_editable_get_type
Editable -> (Ptr Editable -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Editable
o (GType
-> (GValue -> Ptr Editable -> EditableChangedCallback)
-> Ptr Editable
-> IO GValue
forall a.
GType -> (GValue -> a -> EditableChangedCallback) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Editable -> EditableChangedCallback
forall a. GObject a => GValue -> Ptr a -> EditableChangedCallback
B.GValue.set_object)
fromGValue :: GValue -> IO Editable
fromGValue gv :: GValue
gv = do
Ptr Editable
ptr <- GValue -> IO (Ptr Editable)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Editable)
(ManagedPtr Editable -> Editable) -> Ptr Editable -> IO Editable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Editable -> Editable
Editable Ptr Editable
ptr
class (GObject o, O.IsDescendantOf Editable o) => IsEditable o
instance (GObject o, O.IsDescendantOf Editable o) => IsEditable o
instance O.HasParentTypes Editable
type instance O.ParentTypes Editable = '[GObject.Object.Object]
toEditable :: (MonadIO m, IsEditable o) => o -> m Editable
toEditable :: o -> m Editable
toEditable = IO Editable -> m Editable
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Editable -> m Editable)
-> (o -> IO Editable) -> o -> m Editable
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Editable -> Editable) -> o -> IO Editable
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Editable -> Editable
Editable
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Editable
type instance O.AttributeList Editable = EditableAttributeList
type EditableAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveEditableMethod (t :: Symbol) (o :: *) :: * where
ResolveEditableMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveEditableMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveEditableMethod "copyClipboard" o = EditableCopyClipboardMethodInfo
ResolveEditableMethod "cutClipboard" o = EditableCutClipboardMethodInfo
ResolveEditableMethod "deleteSelection" o = EditableDeleteSelectionMethodInfo
ResolveEditableMethod "deleteText" o = EditableDeleteTextMethodInfo
ResolveEditableMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveEditableMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveEditableMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveEditableMethod "insertText" o = EditableInsertTextMethodInfo
ResolveEditableMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveEditableMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveEditableMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveEditableMethod "pasteClipboard" o = EditablePasteClipboardMethodInfo
ResolveEditableMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveEditableMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveEditableMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveEditableMethod "selectRegion" o = EditableSelectRegionMethodInfo
ResolveEditableMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveEditableMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveEditableMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveEditableMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveEditableMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveEditableMethod "getChars" o = EditableGetCharsMethodInfo
ResolveEditableMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveEditableMethod "getEditable" o = EditableGetEditableMethodInfo
ResolveEditableMethod "getPosition" o = EditableGetPositionMethodInfo
ResolveEditableMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveEditableMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveEditableMethod "getSelectionBounds" o = EditableGetSelectionBoundsMethodInfo
ResolveEditableMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveEditableMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveEditableMethod "setEditable" o = EditableSetEditableMethodInfo
ResolveEditableMethod "setPosition" o = EditableSetPositionMethodInfo
ResolveEditableMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveEditableMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEditableMethod t Editable, O.MethodInfo info Editable p) => OL.IsLabel t (Editable -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "gtk_editable_copy_clipboard" gtk_editable_copy_clipboard ::
Ptr Editable ->
IO ()
editableCopyClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> m ()
editableCopyClipboard :: a -> m ()
editableCopyClipboard editable :: a
editable = EditableChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (EditableChangedCallback -> m ())
-> EditableChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
Ptr Editable -> EditableChangedCallback
gtk_editable_copy_clipboard Ptr Editable
editable'
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
() -> EditableChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EditableCopyClipboardMethodInfo
instance (signature ~ (m ()), MonadIO m, IsEditable a) => O.MethodInfo EditableCopyClipboardMethodInfo a signature where
overloadedMethod = editableCopyClipboard
#endif
foreign import ccall "gtk_editable_cut_clipboard" gtk_editable_cut_clipboard ::
Ptr Editable ->
IO ()
editableCutClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> m ()
editableCutClipboard :: a -> m ()
editableCutClipboard editable :: a
editable = EditableChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (EditableChangedCallback -> m ())
-> EditableChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
Ptr Editable -> EditableChangedCallback
gtk_editable_cut_clipboard Ptr Editable
editable'
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
() -> EditableChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EditableCutClipboardMethodInfo
instance (signature ~ (m ()), MonadIO m, IsEditable a) => O.MethodInfo EditableCutClipboardMethodInfo a signature where
overloadedMethod = editableCutClipboard
#endif
foreign import ccall "gtk_editable_delete_selection" gtk_editable_delete_selection ::
Ptr Editable ->
IO ()
editableDeleteSelection ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> m ()
editableDeleteSelection :: a -> m ()
editableDeleteSelection editable :: a
editable = EditableChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (EditableChangedCallback -> m ())
-> EditableChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
Ptr Editable -> EditableChangedCallback
gtk_editable_delete_selection Ptr Editable
editable'
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
() -> EditableChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EditableDeleteSelectionMethodInfo
instance (signature ~ (m ()), MonadIO m, IsEditable a) => O.MethodInfo EditableDeleteSelectionMethodInfo a signature where
overloadedMethod = editableDeleteSelection
#endif
foreign import ccall "gtk_editable_delete_text" gtk_editable_delete_text ::
Ptr Editable ->
Int32 ->
Int32 ->
IO ()
editableDeleteText ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> Int32
-> Int32
-> m ()
editableDeleteText :: a -> Int32 -> Int32 -> m ()
editableDeleteText editable :: a
editable startPos :: Int32
startPos endPos :: Int32
endPos = EditableChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (EditableChangedCallback -> m ())
-> EditableChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
Ptr Editable -> EditableDeleteTextCallback
gtk_editable_delete_text Ptr Editable
editable' Int32
startPos Int32
endPos
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
() -> EditableChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EditableDeleteTextMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsEditable a) => O.MethodInfo EditableDeleteTextMethodInfo a signature where
overloadedMethod = editableDeleteText
#endif
foreign import ccall "gtk_editable_get_chars" gtk_editable_get_chars ::
Ptr Editable ->
Int32 ->
Int32 ->
IO CString
editableGetChars ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> Int32
-> Int32
-> m T.Text
editableGetChars :: a -> Int32 -> Int32 -> m Text
editableGetChars editable :: a
editable startPos :: Int32
startPos endPos :: Int32
endPos = 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 Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
CString
result <- Ptr Editable -> Int32 -> Int32 -> IO CString
gtk_editable_get_chars Ptr Editable
editable' Int32
startPos Int32
endPos
Text -> CString -> EditableChangedCallback
forall a. HasCallStack => Text -> Ptr a -> EditableChangedCallback
checkUnexpectedReturnNULL "editableGetChars" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> EditableChangedCallback
forall a. Ptr a -> EditableChangedCallback
freeMem CString
result
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data EditableGetCharsMethodInfo
instance (signature ~ (Int32 -> Int32 -> m T.Text), MonadIO m, IsEditable a) => O.MethodInfo EditableGetCharsMethodInfo a signature where
overloadedMethod = editableGetChars
#endif
foreign import ccall "gtk_editable_get_editable" gtk_editable_get_editable ::
Ptr Editable ->
IO CInt
editableGetEditable ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> m Bool
editableGetEditable :: a -> m Bool
editableGetEditable editable :: a
editable = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
CInt
result <- Ptr Editable -> IO CInt
gtk_editable_get_editable Ptr Editable
editable'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EditableGetEditableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditable a) => O.MethodInfo EditableGetEditableMethodInfo a signature where
overloadedMethod = editableGetEditable
#endif
foreign import ccall "gtk_editable_get_position" gtk_editable_get_position ::
Ptr Editable ->
IO Int32
editableGetPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> m Int32
editableGetPosition :: a -> m Int32
editableGetPosition editable :: a
editable = 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 Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
Int32
result <- Ptr Editable -> IO Int32
gtk_editable_get_position Ptr Editable
editable'
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data EditableGetPositionMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsEditable a) => O.MethodInfo EditableGetPositionMethodInfo a signature where
overloadedMethod = editableGetPosition
#endif
foreign import ccall "gtk_editable_get_selection_bounds" gtk_editable_get_selection_bounds ::
Ptr Editable ->
Ptr Int32 ->
Ptr Int32 ->
IO CInt
editableGetSelectionBounds ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> m ((Bool, Int32, Int32))
editableGetSelectionBounds :: a -> m (Bool, Int32, Int32)
editableGetSelectionBounds editable :: a
editable = IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32))
-> IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
Ptr Int32
startPos <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
endPos <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
CInt
result <- Ptr Editable -> Ptr Int32 -> Ptr Int32 -> IO CInt
gtk_editable_get_selection_bounds Ptr Editable
editable' Ptr Int32
startPos Ptr Int32
endPos
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
Int32
startPos' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
startPos
Int32
endPos' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
endPos
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
Ptr Int32 -> EditableChangedCallback
forall a. Ptr a -> EditableChangedCallback
freeMem Ptr Int32
startPos
Ptr Int32 -> EditableChangedCallback
forall a. Ptr a -> EditableChangedCallback
freeMem Ptr Int32
endPos
(Bool, Int32, Int32) -> IO (Bool, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int32
startPos', Int32
endPos')
#if defined(ENABLE_OVERLOADING)
data EditableGetSelectionBoundsMethodInfo
instance (signature ~ (m ((Bool, Int32, Int32))), MonadIO m, IsEditable a) => O.MethodInfo EditableGetSelectionBoundsMethodInfo a signature where
overloadedMethod = editableGetSelectionBounds
#endif
foreign import ccall "gtk_editable_insert_text" gtk_editable_insert_text ::
Ptr Editable ->
CString ->
Int32 ->
Ptr Int32 ->
IO ()
editableInsertText ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> T.Text
-> Int32
-> Int32
-> m (Int32)
editableInsertText :: a -> Text -> Int32 -> Int32 -> m Int32
editableInsertText editable :: a
editable newText :: Text
newText newTextLength :: Int32
newTextLength position :: Int32
position = 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 Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
CString
newText' <- Text -> IO CString
textToCString Text
newText
Ptr Int32
position' <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32 -> Int32 -> EditableChangedCallback
forall a. Storable a => Ptr a -> a -> EditableChangedCallback
poke Ptr Int32
position' Int32
position
Ptr Editable
-> CString -> Int32 -> Ptr Int32 -> EditableChangedCallback
gtk_editable_insert_text Ptr Editable
editable' CString
newText' Int32
newTextLength Ptr Int32
position'
Int32
position'' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
position'
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
CString -> EditableChangedCallback
forall a. Ptr a -> EditableChangedCallback
freeMem CString
newText'
Ptr Int32 -> EditableChangedCallback
forall a. Ptr a -> EditableChangedCallback
freeMem Ptr Int32
position'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
position''
#if defined(ENABLE_OVERLOADING)
data EditableInsertTextMethodInfo
instance (signature ~ (T.Text -> Int32 -> Int32 -> m (Int32)), MonadIO m, IsEditable a) => O.MethodInfo EditableInsertTextMethodInfo a signature where
overloadedMethod = editableInsertText
#endif
foreign import ccall "gtk_editable_paste_clipboard" gtk_editable_paste_clipboard ::
Ptr Editable ->
IO ()
editablePasteClipboard ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> m ()
editablePasteClipboard :: a -> m ()
editablePasteClipboard editable :: a
editable = EditableChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (EditableChangedCallback -> m ())
-> EditableChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
Ptr Editable -> EditableChangedCallback
gtk_editable_paste_clipboard Ptr Editable
editable'
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
() -> EditableChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EditablePasteClipboardMethodInfo
instance (signature ~ (m ()), MonadIO m, IsEditable a) => O.MethodInfo EditablePasteClipboardMethodInfo a signature where
overloadedMethod = editablePasteClipboard
#endif
foreign import ccall "gtk_editable_select_region" gtk_editable_select_region ::
Ptr Editable ->
Int32 ->
Int32 ->
IO ()
editableSelectRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> Int32
-> Int32
-> m ()
editableSelectRegion :: a -> Int32 -> Int32 -> m ()
editableSelectRegion editable :: a
editable startPos :: Int32
startPos endPos :: Int32
endPos = EditableChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (EditableChangedCallback -> m ())
-> EditableChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
Ptr Editable -> EditableDeleteTextCallback
gtk_editable_select_region Ptr Editable
editable' Int32
startPos Int32
endPos
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
() -> EditableChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EditableSelectRegionMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsEditable a) => O.MethodInfo EditableSelectRegionMethodInfo a signature where
overloadedMethod = editableSelectRegion
#endif
foreign import ccall "gtk_editable_set_editable" gtk_editable_set_editable ::
Ptr Editable ->
CInt ->
IO ()
editableSetEditable ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> Bool
-> m ()
editableSetEditable :: a -> Bool -> m ()
editableSetEditable editable :: a
editable isEditable :: Bool
isEditable = EditableChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (EditableChangedCallback -> m ())
-> EditableChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
let isEditable' :: CInt
isEditable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
isEditable
Ptr Editable -> CInt -> EditableChangedCallback
gtk_editable_set_editable Ptr Editable
editable' CInt
isEditable'
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
() -> EditableChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EditableSetEditableMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsEditable a) => O.MethodInfo EditableSetEditableMethodInfo a signature where
overloadedMethod = editableSetEditable
#endif
foreign import ccall "gtk_editable_set_position" gtk_editable_set_position ::
Ptr Editable ->
Int32 ->
IO ()
editableSetPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsEditable a) =>
a
-> Int32
-> m ()
editableSetPosition :: a -> Int32 -> m ()
editableSetPosition editable :: a
editable position :: Int32
position = EditableChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (EditableChangedCallback -> m ())
-> EditableChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Editable
editable' <- a -> IO (Ptr Editable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editable
Ptr Editable -> Int32 -> EditableChangedCallback
gtk_editable_set_position Ptr Editable
editable' Int32
position
a -> EditableChangedCallback
forall a. ManagedPtrNewtype a => a -> EditableChangedCallback
touchManagedPtr a
editable
() -> EditableChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EditableSetPositionMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsEditable a) => O.MethodInfo EditableSetPositionMethodInfo a signature where
overloadedMethod = editableSetPosition
#endif