module GI.Gtk.Objects.IMContext
(
IMContext(..) ,
IsIMContext ,
toIMContext ,
noIMContext ,
IMContextDeleteSurroundingMethodInfo ,
iMContextDeleteSurrounding ,
IMContextFilterKeypressMethodInfo ,
iMContextFilterKeypress ,
IMContextFocusInMethodInfo ,
iMContextFocusIn ,
IMContextFocusOutMethodInfo ,
iMContextFocusOut ,
IMContextGetPreeditStringMethodInfo ,
iMContextGetPreeditString ,
IMContextGetSurroundingMethodInfo ,
iMContextGetSurrounding ,
IMContextResetMethodInfo ,
iMContextReset ,
IMContextSetClientWindowMethodInfo ,
iMContextSetClientWindow ,
IMContextSetCursorLocationMethodInfo ,
iMContextSetCursorLocation ,
IMContextSetSurroundingMethodInfo ,
iMContextSetSurrounding ,
IMContextSetUsePreeditMethodInfo ,
iMContextSetUsePreedit ,
IMContextInputHintsPropertyInfo ,
constructIMContextInputHints ,
getIMContextInputHints ,
iMContextInputHints ,
setIMContextInputHints ,
IMContextInputPurposePropertyInfo ,
constructIMContextInputPurpose ,
getIMContextInputPurpose ,
iMContextInputPurpose ,
setIMContextInputPurpose ,
C_IMContextCommitCallback ,
IMContextCommitCallback ,
IMContextCommitSignalInfo ,
afterIMContextCommit ,
genClosure_IMContextCommit ,
mk_IMContextCommitCallback ,
noIMContextCommitCallback ,
onIMContextCommit ,
wrap_IMContextCommitCallback ,
C_IMContextDeleteSurroundingCallback ,
IMContextDeleteSurroundingCallback ,
IMContextDeleteSurroundingSignalInfo ,
afterIMContextDeleteSurrounding ,
genClosure_IMContextDeleteSurrounding ,
mk_IMContextDeleteSurroundingCallback ,
noIMContextDeleteSurroundingCallback ,
onIMContextDeleteSurrounding ,
wrap_IMContextDeleteSurroundingCallback ,
C_IMContextPreeditChangedCallback ,
IMContextPreeditChangedCallback ,
IMContextPreeditChangedSignalInfo ,
afterIMContextPreeditChanged ,
genClosure_IMContextPreeditChanged ,
mk_IMContextPreeditChangedCallback ,
noIMContextPreeditChangedCallback ,
onIMContextPreeditChanged ,
wrap_IMContextPreeditChangedCallback ,
C_IMContextPreeditEndCallback ,
IMContextPreeditEndCallback ,
IMContextPreeditEndSignalInfo ,
afterIMContextPreeditEnd ,
genClosure_IMContextPreeditEnd ,
mk_IMContextPreeditEndCallback ,
noIMContextPreeditEndCallback ,
onIMContextPreeditEnd ,
wrap_IMContextPreeditEndCallback ,
C_IMContextPreeditStartCallback ,
IMContextPreeditStartCallback ,
IMContextPreeditStartSignalInfo ,
afterIMContextPreeditStart ,
genClosure_IMContextPreeditStart ,
mk_IMContextPreeditStartCallback ,
noIMContextPreeditStartCallback ,
onIMContextPreeditStart ,
wrap_IMContextPreeditStartCallback ,
C_IMContextRetrieveSurroundingCallback ,
IMContextRetrieveSurroundingCallback ,
IMContextRetrieveSurroundingSignalInfo ,
afterIMContextRetrieveSurrounding ,
genClosure_IMContextRetrieveSurrounding ,
mk_IMContextRetrieveSurroundingCallback ,
noIMContextRetrieveSurroundingCallback ,
onIMContextRetrieveSurrounding ,
wrap_IMContextRetrieveSurroundingCallback,
) 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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Window as Gdk.Window
import qualified GI.Gdk.Structs.EventKey as Gdk.EventKey
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gtk.Enums as Gtk.Enums
import qualified GI.Gtk.Flags as Gtk.Flags
import qualified GI.Pango.Structs.AttrList as Pango.AttrList
newtype IMContext = IMContext (ManagedPtr IMContext)
foreign import ccall "gtk_im_context_get_type"
c_gtk_im_context_get_type :: IO GType
instance GObject IMContext where
gobjectType _ = c_gtk_im_context_get_type
class GObject o => IsIMContext o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError IMContext a) =>
IsIMContext a
#endif
instance IsIMContext IMContext
instance GObject.Object.IsObject IMContext
toIMContext :: IsIMContext o => o -> IO IMContext
toIMContext = unsafeCastTo IMContext
noIMContext :: Maybe IMContext
noIMContext = Nothing
type family ResolveIMContextMethod (t :: Symbol) (o :: *) :: * where
ResolveIMContextMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveIMContextMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveIMContextMethod "deleteSurrounding" o = IMContextDeleteSurroundingMethodInfo
ResolveIMContextMethod "filterKeypress" o = IMContextFilterKeypressMethodInfo
ResolveIMContextMethod "focusIn" o = IMContextFocusInMethodInfo
ResolveIMContextMethod "focusOut" o = IMContextFocusOutMethodInfo
ResolveIMContextMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveIMContextMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveIMContextMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveIMContextMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveIMContextMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveIMContextMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveIMContextMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveIMContextMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveIMContextMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
ResolveIMContextMethod "reset" o = IMContextResetMethodInfo
ResolveIMContextMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveIMContextMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveIMContextMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveIMContextMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveIMContextMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveIMContextMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveIMContextMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveIMContextMethod "getPreeditString" o = IMContextGetPreeditStringMethodInfo
ResolveIMContextMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveIMContextMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveIMContextMethod "getSurrounding" o = IMContextGetSurroundingMethodInfo
ResolveIMContextMethod "setClientWindow" o = IMContextSetClientWindowMethodInfo
ResolveIMContextMethod "setCursorLocation" o = IMContextSetCursorLocationMethodInfo
ResolveIMContextMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveIMContextMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveIMContextMethod "setSurrounding" o = IMContextSetSurroundingMethodInfo
ResolveIMContextMethod "setUsePreedit" o = IMContextSetUsePreeditMethodInfo
ResolveIMContextMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveIMContextMethod t IMContext, O.MethodInfo info IMContext p) => O.IsLabelProxy t (IMContext -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveIMContextMethod t IMContext, O.MethodInfo info IMContext p) => O.IsLabel t (IMContext -> p) where
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
type IMContextCommitCallback =
T.Text ->
IO ()
noIMContextCommitCallback :: Maybe IMContextCommitCallback
noIMContextCommitCallback = Nothing
type C_IMContextCommitCallback =
Ptr () ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_IMContextCommitCallback :: C_IMContextCommitCallback -> IO (FunPtr C_IMContextCommitCallback)
genClosure_IMContextCommit :: IMContextCommitCallback -> IO Closure
genClosure_IMContextCommit cb = do
let cb' = wrap_IMContextCommitCallback cb
mk_IMContextCommitCallback cb' >>= newCClosure
wrap_IMContextCommitCallback ::
IMContextCommitCallback ->
Ptr () ->
CString ->
Ptr () ->
IO ()
wrap_IMContextCommitCallback _cb _ str _ = do
str' <- cstringToText str
_cb str'
onIMContextCommit :: (GObject a, MonadIO m) => a -> IMContextCommitCallback -> m SignalHandlerId
onIMContextCommit obj cb = liftIO $ connectIMContextCommit obj cb SignalConnectBefore
afterIMContextCommit :: (GObject a, MonadIO m) => a -> IMContextCommitCallback -> m SignalHandlerId
afterIMContextCommit obj cb = connectIMContextCommit obj cb SignalConnectAfter
connectIMContextCommit :: (GObject a, MonadIO m) =>
a -> IMContextCommitCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextCommit obj cb after = liftIO $ do
let cb' = wrap_IMContextCommitCallback cb
cb'' <- mk_IMContextCommitCallback cb'
connectSignalFunPtr obj "commit" cb'' after
type IMContextDeleteSurroundingCallback =
Int32 ->
Int32 ->
IO Bool
noIMContextDeleteSurroundingCallback :: Maybe IMContextDeleteSurroundingCallback
noIMContextDeleteSurroundingCallback = Nothing
type C_IMContextDeleteSurroundingCallback =
Ptr () ->
Int32 ->
Int32 ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_IMContextDeleteSurroundingCallback :: C_IMContextDeleteSurroundingCallback -> IO (FunPtr C_IMContextDeleteSurroundingCallback)
genClosure_IMContextDeleteSurrounding :: IMContextDeleteSurroundingCallback -> IO Closure
genClosure_IMContextDeleteSurrounding cb = do
let cb' = wrap_IMContextDeleteSurroundingCallback cb
mk_IMContextDeleteSurroundingCallback cb' >>= newCClosure
wrap_IMContextDeleteSurroundingCallback ::
IMContextDeleteSurroundingCallback ->
Ptr () ->
Int32 ->
Int32 ->
Ptr () ->
IO CInt
wrap_IMContextDeleteSurroundingCallback _cb _ offset nChars _ = do
result <- _cb offset nChars
let result' = (fromIntegral . fromEnum) result
return result'
onIMContextDeleteSurrounding :: (GObject a, MonadIO m) => a -> IMContextDeleteSurroundingCallback -> m SignalHandlerId
onIMContextDeleteSurrounding obj cb = liftIO $ connectIMContextDeleteSurrounding obj cb SignalConnectBefore
afterIMContextDeleteSurrounding :: (GObject a, MonadIO m) => a -> IMContextDeleteSurroundingCallback -> m SignalHandlerId
afterIMContextDeleteSurrounding obj cb = connectIMContextDeleteSurrounding obj cb SignalConnectAfter
connectIMContextDeleteSurrounding :: (GObject a, MonadIO m) =>
a -> IMContextDeleteSurroundingCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextDeleteSurrounding obj cb after = liftIO $ do
let cb' = wrap_IMContextDeleteSurroundingCallback cb
cb'' <- mk_IMContextDeleteSurroundingCallback cb'
connectSignalFunPtr obj "delete-surrounding" cb'' after
type IMContextPreeditChangedCallback =
IO ()
noIMContextPreeditChangedCallback :: Maybe IMContextPreeditChangedCallback
noIMContextPreeditChangedCallback = Nothing
type C_IMContextPreeditChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_IMContextPreeditChangedCallback :: C_IMContextPreeditChangedCallback -> IO (FunPtr C_IMContextPreeditChangedCallback)
genClosure_IMContextPreeditChanged :: IMContextPreeditChangedCallback -> IO Closure
genClosure_IMContextPreeditChanged cb = do
let cb' = wrap_IMContextPreeditChangedCallback cb
mk_IMContextPreeditChangedCallback cb' >>= newCClosure
wrap_IMContextPreeditChangedCallback ::
IMContextPreeditChangedCallback ->
Ptr () ->
Ptr () ->
IO ()
wrap_IMContextPreeditChangedCallback _cb _ _ = do
_cb
onIMContextPreeditChanged :: (GObject a, MonadIO m) => a -> IMContextPreeditChangedCallback -> m SignalHandlerId
onIMContextPreeditChanged obj cb = liftIO $ connectIMContextPreeditChanged obj cb SignalConnectBefore
afterIMContextPreeditChanged :: (GObject a, MonadIO m) => a -> IMContextPreeditChangedCallback -> m SignalHandlerId
afterIMContextPreeditChanged obj cb = connectIMContextPreeditChanged obj cb SignalConnectAfter
connectIMContextPreeditChanged :: (GObject a, MonadIO m) =>
a -> IMContextPreeditChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextPreeditChanged obj cb after = liftIO $ do
let cb' = wrap_IMContextPreeditChangedCallback cb
cb'' <- mk_IMContextPreeditChangedCallback cb'
connectSignalFunPtr obj "preedit-changed" cb'' after
type IMContextPreeditEndCallback =
IO ()
noIMContextPreeditEndCallback :: Maybe IMContextPreeditEndCallback
noIMContextPreeditEndCallback = Nothing
type C_IMContextPreeditEndCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_IMContextPreeditEndCallback :: C_IMContextPreeditEndCallback -> IO (FunPtr C_IMContextPreeditEndCallback)
genClosure_IMContextPreeditEnd :: IMContextPreeditEndCallback -> IO Closure
genClosure_IMContextPreeditEnd cb = do
let cb' = wrap_IMContextPreeditEndCallback cb
mk_IMContextPreeditEndCallback cb' >>= newCClosure
wrap_IMContextPreeditEndCallback ::
IMContextPreeditEndCallback ->
Ptr () ->
Ptr () ->
IO ()
wrap_IMContextPreeditEndCallback _cb _ _ = do
_cb
onIMContextPreeditEnd :: (GObject a, MonadIO m) => a -> IMContextPreeditEndCallback -> m SignalHandlerId
onIMContextPreeditEnd obj cb = liftIO $ connectIMContextPreeditEnd obj cb SignalConnectBefore
afterIMContextPreeditEnd :: (GObject a, MonadIO m) => a -> IMContextPreeditEndCallback -> m SignalHandlerId
afterIMContextPreeditEnd obj cb = connectIMContextPreeditEnd obj cb SignalConnectAfter
connectIMContextPreeditEnd :: (GObject a, MonadIO m) =>
a -> IMContextPreeditEndCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextPreeditEnd obj cb after = liftIO $ do
let cb' = wrap_IMContextPreeditEndCallback cb
cb'' <- mk_IMContextPreeditEndCallback cb'
connectSignalFunPtr obj "preedit-end" cb'' after
type IMContextPreeditStartCallback =
IO ()
noIMContextPreeditStartCallback :: Maybe IMContextPreeditStartCallback
noIMContextPreeditStartCallback = Nothing
type C_IMContextPreeditStartCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_IMContextPreeditStartCallback :: C_IMContextPreeditStartCallback -> IO (FunPtr C_IMContextPreeditStartCallback)
genClosure_IMContextPreeditStart :: IMContextPreeditStartCallback -> IO Closure
genClosure_IMContextPreeditStart cb = do
let cb' = wrap_IMContextPreeditStartCallback cb
mk_IMContextPreeditStartCallback cb' >>= newCClosure
wrap_IMContextPreeditStartCallback ::
IMContextPreeditStartCallback ->
Ptr () ->
Ptr () ->
IO ()
wrap_IMContextPreeditStartCallback _cb _ _ = do
_cb
onIMContextPreeditStart :: (GObject a, MonadIO m) => a -> IMContextPreeditStartCallback -> m SignalHandlerId
onIMContextPreeditStart obj cb = liftIO $ connectIMContextPreeditStart obj cb SignalConnectBefore
afterIMContextPreeditStart :: (GObject a, MonadIO m) => a -> IMContextPreeditStartCallback -> m SignalHandlerId
afterIMContextPreeditStart obj cb = connectIMContextPreeditStart obj cb SignalConnectAfter
connectIMContextPreeditStart :: (GObject a, MonadIO m) =>
a -> IMContextPreeditStartCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextPreeditStart obj cb after = liftIO $ do
let cb' = wrap_IMContextPreeditStartCallback cb
cb'' <- mk_IMContextPreeditStartCallback cb'
connectSignalFunPtr obj "preedit-start" cb'' after
type IMContextRetrieveSurroundingCallback =
IO Bool
noIMContextRetrieveSurroundingCallback :: Maybe IMContextRetrieveSurroundingCallback
noIMContextRetrieveSurroundingCallback = Nothing
type C_IMContextRetrieveSurroundingCallback =
Ptr () ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_IMContextRetrieveSurroundingCallback :: C_IMContextRetrieveSurroundingCallback -> IO (FunPtr C_IMContextRetrieveSurroundingCallback)
genClosure_IMContextRetrieveSurrounding :: IMContextRetrieveSurroundingCallback -> IO Closure
genClosure_IMContextRetrieveSurrounding cb = do
let cb' = wrap_IMContextRetrieveSurroundingCallback cb
mk_IMContextRetrieveSurroundingCallback cb' >>= newCClosure
wrap_IMContextRetrieveSurroundingCallback ::
IMContextRetrieveSurroundingCallback ->
Ptr () ->
Ptr () ->
IO CInt
wrap_IMContextRetrieveSurroundingCallback _cb _ _ = do
result <- _cb
let result' = (fromIntegral . fromEnum) result
return result'
onIMContextRetrieveSurrounding :: (GObject a, MonadIO m) => a -> IMContextRetrieveSurroundingCallback -> m SignalHandlerId
onIMContextRetrieveSurrounding obj cb = liftIO $ connectIMContextRetrieveSurrounding obj cb SignalConnectBefore
afterIMContextRetrieveSurrounding :: (GObject a, MonadIO m) => a -> IMContextRetrieveSurroundingCallback -> m SignalHandlerId
afterIMContextRetrieveSurrounding obj cb = connectIMContextRetrieveSurrounding obj cb SignalConnectAfter
connectIMContextRetrieveSurrounding :: (GObject a, MonadIO m) =>
a -> IMContextRetrieveSurroundingCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextRetrieveSurrounding obj cb after = liftIO $ do
let cb' = wrap_IMContextRetrieveSurroundingCallback cb
cb'' <- mk_IMContextRetrieveSurroundingCallback cb'
connectSignalFunPtr obj "retrieve-surrounding" cb'' after
getIMContextInputHints :: (MonadIO m, IsIMContext o) => o -> m [Gtk.Flags.InputHints]
getIMContextInputHints obj = liftIO $ getObjectPropertyFlags obj "input-hints"
setIMContextInputHints :: (MonadIO m, IsIMContext o) => o -> [Gtk.Flags.InputHints] -> m ()
setIMContextInputHints obj val = liftIO $ setObjectPropertyFlags obj "input-hints" val
constructIMContextInputHints :: (IsIMContext o) => [Gtk.Flags.InputHints] -> IO (GValueConstruct o)
constructIMContextInputHints val = constructObjectPropertyFlags "input-hints" val
data IMContextInputHintsPropertyInfo
instance AttrInfo IMContextInputHintsPropertyInfo where
type AttrAllowedOps IMContextInputHintsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint IMContextInputHintsPropertyInfo = (~) [Gtk.Flags.InputHints]
type AttrBaseTypeConstraint IMContextInputHintsPropertyInfo = IsIMContext
type AttrGetType IMContextInputHintsPropertyInfo = [Gtk.Flags.InputHints]
type AttrLabel IMContextInputHintsPropertyInfo = "input-hints"
type AttrOrigin IMContextInputHintsPropertyInfo = IMContext
attrGet _ = getIMContextInputHints
attrSet _ = setIMContextInputHints
attrConstruct _ = constructIMContextInputHints
attrClear _ = undefined
getIMContextInputPurpose :: (MonadIO m, IsIMContext o) => o -> m Gtk.Enums.InputPurpose
getIMContextInputPurpose obj = liftIO $ getObjectPropertyEnum obj "input-purpose"
setIMContextInputPurpose :: (MonadIO m, IsIMContext o) => o -> Gtk.Enums.InputPurpose -> m ()
setIMContextInputPurpose obj val = liftIO $ setObjectPropertyEnum obj "input-purpose" val
constructIMContextInputPurpose :: (IsIMContext o) => Gtk.Enums.InputPurpose -> IO (GValueConstruct o)
constructIMContextInputPurpose val = constructObjectPropertyEnum "input-purpose" val
data IMContextInputPurposePropertyInfo
instance AttrInfo IMContextInputPurposePropertyInfo where
type AttrAllowedOps IMContextInputPurposePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint IMContextInputPurposePropertyInfo = (~) Gtk.Enums.InputPurpose
type AttrBaseTypeConstraint IMContextInputPurposePropertyInfo = IsIMContext
type AttrGetType IMContextInputPurposePropertyInfo = Gtk.Enums.InputPurpose
type AttrLabel IMContextInputPurposePropertyInfo = "input-purpose"
type AttrOrigin IMContextInputPurposePropertyInfo = IMContext
attrGet _ = getIMContextInputPurpose
attrSet _ = setIMContextInputPurpose
attrConstruct _ = constructIMContextInputPurpose
attrClear _ = undefined
instance O.HasAttributeList IMContext
type instance O.AttributeList IMContext = IMContextAttributeList
type IMContextAttributeList = ('[ '("inputHints", IMContextInputHintsPropertyInfo), '("inputPurpose", IMContextInputPurposePropertyInfo)] :: [(Symbol, *)])
iMContextInputHints :: AttrLabelProxy "inputHints"
iMContextInputHints = AttrLabelProxy
iMContextInputPurpose :: AttrLabelProxy "inputPurpose"
iMContextInputPurpose = AttrLabelProxy
data IMContextCommitSignalInfo
instance SignalInfo IMContextCommitSignalInfo where
type HaskellCallbackType IMContextCommitSignalInfo = IMContextCommitCallback
connectSignal _ = connectIMContextCommit
data IMContextDeleteSurroundingSignalInfo
instance SignalInfo IMContextDeleteSurroundingSignalInfo where
type HaskellCallbackType IMContextDeleteSurroundingSignalInfo = IMContextDeleteSurroundingCallback
connectSignal _ = connectIMContextDeleteSurrounding
data IMContextPreeditChangedSignalInfo
instance SignalInfo IMContextPreeditChangedSignalInfo where
type HaskellCallbackType IMContextPreeditChangedSignalInfo = IMContextPreeditChangedCallback
connectSignal _ = connectIMContextPreeditChanged
data IMContextPreeditEndSignalInfo
instance SignalInfo IMContextPreeditEndSignalInfo where
type HaskellCallbackType IMContextPreeditEndSignalInfo = IMContextPreeditEndCallback
connectSignal _ = connectIMContextPreeditEnd
data IMContextPreeditStartSignalInfo
instance SignalInfo IMContextPreeditStartSignalInfo where
type HaskellCallbackType IMContextPreeditStartSignalInfo = IMContextPreeditStartCallback
connectSignal _ = connectIMContextPreeditStart
data IMContextRetrieveSurroundingSignalInfo
instance SignalInfo IMContextRetrieveSurroundingSignalInfo where
type HaskellCallbackType IMContextRetrieveSurroundingSignalInfo = IMContextRetrieveSurroundingCallback
connectSignal _ = connectIMContextRetrieveSurrounding
type instance O.SignalList IMContext = IMContextSignalList
type IMContextSignalList = ('[ '("commit", IMContextCommitSignalInfo), '("deleteSurrounding", IMContextDeleteSurroundingSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("preeditChanged", IMContextPreeditChangedSignalInfo), '("preeditEnd", IMContextPreeditEndSignalInfo), '("preeditStart", IMContextPreeditStartSignalInfo), '("retrieveSurrounding", IMContextRetrieveSurroundingSignalInfo)] :: [(Symbol, *)])
foreign import ccall "gtk_im_context_delete_surrounding" gtk_im_context_delete_surrounding ::
Ptr IMContext ->
Int32 ->
Int32 ->
IO CInt
iMContextDeleteSurrounding ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> Int32
-> Int32
-> m Bool
iMContextDeleteSurrounding context offset nChars = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gtk_im_context_delete_surrounding context' offset nChars
let result' = (/= 0) result
touchManagedPtr context
return result'
data IMContextDeleteSurroundingMethodInfo
instance (signature ~ (Int32 -> Int32 -> m Bool), MonadIO m, IsIMContext a) => O.MethodInfo IMContextDeleteSurroundingMethodInfo a signature where
overloadedMethod _ = iMContextDeleteSurrounding
foreign import ccall "gtk_im_context_filter_keypress" gtk_im_context_filter_keypress ::
Ptr IMContext ->
Ptr Gdk.EventKey.EventKey ->
IO CInt
iMContextFilterKeypress ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> Gdk.EventKey.EventKey
-> m Bool
iMContextFilterKeypress context event = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
event' <- unsafeManagedPtrGetPtr event
result <- gtk_im_context_filter_keypress context' event'
let result' = (/= 0) result
touchManagedPtr context
touchManagedPtr event
return result'
data IMContextFilterKeypressMethodInfo
instance (signature ~ (Gdk.EventKey.EventKey -> m Bool), MonadIO m, IsIMContext a) => O.MethodInfo IMContextFilterKeypressMethodInfo a signature where
overloadedMethod _ = iMContextFilterKeypress
foreign import ccall "gtk_im_context_focus_in" gtk_im_context_focus_in ::
Ptr IMContext ->
IO ()
iMContextFocusIn ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> m ()
iMContextFocusIn context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
gtk_im_context_focus_in context'
touchManagedPtr context
return ()
data IMContextFocusInMethodInfo
instance (signature ~ (m ()), MonadIO m, IsIMContext a) => O.MethodInfo IMContextFocusInMethodInfo a signature where
overloadedMethod _ = iMContextFocusIn
foreign import ccall "gtk_im_context_focus_out" gtk_im_context_focus_out ::
Ptr IMContext ->
IO ()
iMContextFocusOut ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> m ()
iMContextFocusOut context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
gtk_im_context_focus_out context'
touchManagedPtr context
return ()
data IMContextFocusOutMethodInfo
instance (signature ~ (m ()), MonadIO m, IsIMContext a) => O.MethodInfo IMContextFocusOutMethodInfo a signature where
overloadedMethod _ = iMContextFocusOut
foreign import ccall "gtk_im_context_get_preedit_string" gtk_im_context_get_preedit_string ::
Ptr IMContext ->
Ptr CString ->
Ptr (Ptr Pango.AttrList.AttrList) ->
Ptr Int32 ->
IO ()
iMContextGetPreeditString ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> m (T.Text,Pango.AttrList.AttrList,Int32)
iMContextGetPreeditString context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
str <- allocMem :: IO (Ptr CString)
attrs <- allocMem :: IO (Ptr (Ptr Pango.AttrList.AttrList))
cursorPos <- allocMem :: IO (Ptr Int32)
gtk_im_context_get_preedit_string context' str attrs cursorPos
str' <- peek str
str'' <- cstringToText str'
freeMem str'
attrs' <- peek attrs
attrs'' <- (wrapBoxed Pango.AttrList.AttrList) attrs'
cursorPos' <- peek cursorPos
touchManagedPtr context
freeMem str
freeMem attrs
freeMem cursorPos
return (str'', attrs'', cursorPos')
data IMContextGetPreeditStringMethodInfo
instance (signature ~ (m (T.Text,Pango.AttrList.AttrList,Int32)), MonadIO m, IsIMContext a) => O.MethodInfo IMContextGetPreeditStringMethodInfo a signature where
overloadedMethod _ = iMContextGetPreeditString
foreign import ccall "gtk_im_context_get_surrounding" gtk_im_context_get_surrounding ::
Ptr IMContext ->
Ptr CString ->
Ptr Int32 ->
IO CInt
iMContextGetSurrounding ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> m (Bool,T.Text,Int32)
iMContextGetSurrounding context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
text <- allocMem :: IO (Ptr CString)
cursorIndex <- allocMem :: IO (Ptr Int32)
result <- gtk_im_context_get_surrounding context' text cursorIndex
let result' = (/= 0) result
text' <- peek text
text'' <- cstringToText text'
freeMem text'
cursorIndex' <- peek cursorIndex
touchManagedPtr context
freeMem text
freeMem cursorIndex
return (result', text'', cursorIndex')
data IMContextGetSurroundingMethodInfo
instance (signature ~ (m (Bool,T.Text,Int32)), MonadIO m, IsIMContext a) => O.MethodInfo IMContextGetSurroundingMethodInfo a signature where
overloadedMethod _ = iMContextGetSurrounding
foreign import ccall "gtk_im_context_reset" gtk_im_context_reset ::
Ptr IMContext ->
IO ()
iMContextReset ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> m ()
iMContextReset context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
gtk_im_context_reset context'
touchManagedPtr context
return ()
data IMContextResetMethodInfo
instance (signature ~ (m ()), MonadIO m, IsIMContext a) => O.MethodInfo IMContextResetMethodInfo a signature where
overloadedMethod _ = iMContextReset
foreign import ccall "gtk_im_context_set_client_window" gtk_im_context_set_client_window ::
Ptr IMContext ->
Ptr Gdk.Window.Window ->
IO ()
iMContextSetClientWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a, Gdk.Window.IsWindow b) =>
a
-> Maybe (b)
-> m ()
iMContextSetClientWindow context window = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
maybeWindow <- case window of
Nothing -> return nullPtr
Just jWindow -> do
jWindow' <- unsafeManagedPtrCastPtr jWindow
return jWindow'
gtk_im_context_set_client_window context' maybeWindow
touchManagedPtr context
whenJust window touchManagedPtr
return ()
data IMContextSetClientWindowMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsIMContext a, Gdk.Window.IsWindow b) => O.MethodInfo IMContextSetClientWindowMethodInfo a signature where
overloadedMethod _ = iMContextSetClientWindow
foreign import ccall "gtk_im_context_set_cursor_location" gtk_im_context_set_cursor_location ::
Ptr IMContext ->
Ptr Gdk.Rectangle.Rectangle ->
IO ()
iMContextSetCursorLocation ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> Gdk.Rectangle.Rectangle
-> m ()
iMContextSetCursorLocation context area = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
area' <- unsafeManagedPtrGetPtr area
gtk_im_context_set_cursor_location context' area'
touchManagedPtr context
touchManagedPtr area
return ()
data IMContextSetCursorLocationMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> m ()), MonadIO m, IsIMContext a) => O.MethodInfo IMContextSetCursorLocationMethodInfo a signature where
overloadedMethod _ = iMContextSetCursorLocation
foreign import ccall "gtk_im_context_set_surrounding" gtk_im_context_set_surrounding ::
Ptr IMContext ->
CString ->
Int32 ->
Int32 ->
IO ()
iMContextSetSurrounding ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> T.Text
-> Int32
-> Int32
-> m ()
iMContextSetSurrounding context text len cursorIndex = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
text' <- textToCString text
gtk_im_context_set_surrounding context' text' len cursorIndex
touchManagedPtr context
freeMem text'
return ()
data IMContextSetSurroundingMethodInfo
instance (signature ~ (T.Text -> Int32 -> Int32 -> m ()), MonadIO m, IsIMContext a) => O.MethodInfo IMContextSetSurroundingMethodInfo a signature where
overloadedMethod _ = iMContextSetSurrounding
foreign import ccall "gtk_im_context_set_use_preedit" gtk_im_context_set_use_preedit ::
Ptr IMContext ->
CInt ->
IO ()
iMContextSetUsePreedit ::
(B.CallStack.HasCallStack, MonadIO m, IsIMContext a) =>
a
-> Bool
-> m ()
iMContextSetUsePreedit context usePreedit = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
let usePreedit' = (fromIntegral . fromEnum) usePreedit
gtk_im_context_set_use_preedit context' usePreedit'
touchManagedPtr context
return ()
data IMContextSetUsePreeditMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsIMContext a) => O.MethodInfo IMContextSetUsePreeditMethodInfo a signature where
overloadedMethod _ = iMContextSetUsePreedit