{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.IBus.Objects.LookupTable
(
LookupTable(..) ,
IsLookupTable ,
toLookupTable ,
#if defined(ENABLE_OVERLOADING)
ResolveLookupTableMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
LookupTableAppendCandidateMethodInfo ,
#endif
lookupTableAppendCandidate ,
#if defined(ENABLE_OVERLOADING)
LookupTableAppendLabelMethodInfo ,
#endif
lookupTableAppendLabel ,
#if defined(ENABLE_OVERLOADING)
LookupTableClearMethodInfo ,
#endif
lookupTableClear ,
#if defined(ENABLE_OVERLOADING)
LookupTableCursorDownMethodInfo ,
#endif
lookupTableCursorDown ,
#if defined(ENABLE_OVERLOADING)
LookupTableCursorUpMethodInfo ,
#endif
lookupTableCursorUp ,
#if defined(ENABLE_OVERLOADING)
LookupTableGetCandidateMethodInfo ,
#endif
lookupTableGetCandidate ,
#if defined(ENABLE_OVERLOADING)
LookupTableGetCursorInPageMethodInfo ,
#endif
lookupTableGetCursorInPage ,
#if defined(ENABLE_OVERLOADING)
LookupTableGetCursorPosMethodInfo ,
#endif
lookupTableGetCursorPos ,
#if defined(ENABLE_OVERLOADING)
LookupTableGetLabelMethodInfo ,
#endif
lookupTableGetLabel ,
#if defined(ENABLE_OVERLOADING)
LookupTableGetNumberOfCandidatesMethodInfo,
#endif
lookupTableGetNumberOfCandidates ,
#if defined(ENABLE_OVERLOADING)
LookupTableGetOrientationMethodInfo ,
#endif
lookupTableGetOrientation ,
#if defined(ENABLE_OVERLOADING)
LookupTableGetPageSizeMethodInfo ,
#endif
lookupTableGetPageSize ,
#if defined(ENABLE_OVERLOADING)
LookupTableIsCursorVisibleMethodInfo ,
#endif
lookupTableIsCursorVisible ,
#if defined(ENABLE_OVERLOADING)
LookupTableIsRoundMethodInfo ,
#endif
lookupTableIsRound ,
lookupTableNew ,
#if defined(ENABLE_OVERLOADING)
LookupTablePageDownMethodInfo ,
#endif
lookupTablePageDown ,
#if defined(ENABLE_OVERLOADING)
LookupTablePageUpMethodInfo ,
#endif
lookupTablePageUp ,
#if defined(ENABLE_OVERLOADING)
LookupTableSetCursorPosMethodInfo ,
#endif
lookupTableSetCursorPos ,
#if defined(ENABLE_OVERLOADING)
LookupTableSetCursorVisibleMethodInfo ,
#endif
lookupTableSetCursorVisible ,
#if defined(ENABLE_OVERLOADING)
LookupTableSetLabelMethodInfo ,
#endif
lookupTableSetLabel ,
#if defined(ENABLE_OVERLOADING)
LookupTableSetOrientationMethodInfo ,
#endif
lookupTableSetOrientation ,
#if defined(ENABLE_OVERLOADING)
LookupTableSetPageSizeMethodInfo ,
#endif
lookupTableSetPageSize ,
#if defined(ENABLE_OVERLOADING)
LookupTableSetRoundMethodInfo ,
#endif
lookupTableSetRound ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.IBus.Objects.Object as IBus.Object
import {-# SOURCE #-} qualified GI.IBus.Objects.Serializable as IBus.Serializable
import {-# SOURCE #-} qualified GI.IBus.Objects.Text as IBus.Text
newtype LookupTable = LookupTable (SP.ManagedPtr LookupTable)
deriving (LookupTable -> LookupTable -> Bool
(LookupTable -> LookupTable -> Bool)
-> (LookupTable -> LookupTable -> Bool) -> Eq LookupTable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LookupTable -> LookupTable -> Bool
$c/= :: LookupTable -> LookupTable -> Bool
== :: LookupTable -> LookupTable -> Bool
$c== :: LookupTable -> LookupTable -> Bool
Eq)
instance SP.ManagedPtrNewtype LookupTable where
toManagedPtr :: LookupTable -> ManagedPtr LookupTable
toManagedPtr (LookupTable ManagedPtr LookupTable
p) = ManagedPtr LookupTable
p
foreign import ccall "ibus_lookup_table_get_type"
c_ibus_lookup_table_get_type :: IO B.Types.GType
instance B.Types.TypedObject LookupTable where
glibType :: IO GType
glibType = IO GType
c_ibus_lookup_table_get_type
instance B.Types.GObject LookupTable
instance B.GValue.IsGValue LookupTable where
toGValue :: LookupTable -> IO GValue
toGValue LookupTable
o = do
GType
gtype <- IO GType
c_ibus_lookup_table_get_type
LookupTable -> (Ptr LookupTable -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr LookupTable
o (GType
-> (GValue -> Ptr LookupTable -> IO ())
-> Ptr LookupTable
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr LookupTable -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO LookupTable
fromGValue GValue
gv = do
Ptr LookupTable
ptr <- GValue -> IO (Ptr LookupTable)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr LookupTable)
(ManagedPtr LookupTable -> LookupTable)
-> Ptr LookupTable -> IO LookupTable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr LookupTable -> LookupTable
LookupTable Ptr LookupTable
ptr
class (SP.GObject o, O.IsDescendantOf LookupTable o) => IsLookupTable o
instance (SP.GObject o, O.IsDescendantOf LookupTable o) => IsLookupTable o
instance O.HasParentTypes LookupTable
type instance O.ParentTypes LookupTable = '[IBus.Serializable.Serializable, IBus.Object.Object, GObject.Object.Object]
toLookupTable :: (MonadIO m, IsLookupTable o) => o -> m LookupTable
toLookupTable :: o -> m LookupTable
toLookupTable = IO LookupTable -> m LookupTable
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO LookupTable -> m LookupTable)
-> (o -> IO LookupTable) -> o -> m LookupTable
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr LookupTable -> LookupTable) -> o -> IO LookupTable
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr LookupTable -> LookupTable
LookupTable
#if defined(ENABLE_OVERLOADING)
type family ResolveLookupTableMethod (t :: Symbol) (o :: *) :: * where
ResolveLookupTableMethod "appendCandidate" o = LookupTableAppendCandidateMethodInfo
ResolveLookupTableMethod "appendLabel" o = LookupTableAppendLabelMethodInfo
ResolveLookupTableMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveLookupTableMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveLookupTableMethod "clear" o = LookupTableClearMethodInfo
ResolveLookupTableMethod "copy" o = IBus.Serializable.SerializableCopyMethodInfo
ResolveLookupTableMethod "cursorDown" o = LookupTableCursorDownMethodInfo
ResolveLookupTableMethod "cursorUp" o = LookupTableCursorUpMethodInfo
ResolveLookupTableMethod "destroy" o = IBus.Object.ObjectDestroyMethodInfo
ResolveLookupTableMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveLookupTableMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveLookupTableMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveLookupTableMethod "isCursorVisible" o = LookupTableIsCursorVisibleMethodInfo
ResolveLookupTableMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveLookupTableMethod "isRound" o = LookupTableIsRoundMethodInfo
ResolveLookupTableMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveLookupTableMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveLookupTableMethod "pageDown" o = LookupTablePageDownMethodInfo
ResolveLookupTableMethod "pageUp" o = LookupTablePageUpMethodInfo
ResolveLookupTableMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveLookupTableMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveLookupTableMethod "removeQattachment" o = IBus.Serializable.SerializableRemoveQattachmentMethodInfo
ResolveLookupTableMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveLookupTableMethod "serializeObject" o = IBus.Serializable.SerializableSerializeObjectMethodInfo
ResolveLookupTableMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveLookupTableMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveLookupTableMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveLookupTableMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveLookupTableMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveLookupTableMethod "getCandidate" o = LookupTableGetCandidateMethodInfo
ResolveLookupTableMethod "getCursorInPage" o = LookupTableGetCursorInPageMethodInfo
ResolveLookupTableMethod "getCursorPos" o = LookupTableGetCursorPosMethodInfo
ResolveLookupTableMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveLookupTableMethod "getLabel" o = LookupTableGetLabelMethodInfo
ResolveLookupTableMethod "getNumberOfCandidates" o = LookupTableGetNumberOfCandidatesMethodInfo
ResolveLookupTableMethod "getOrientation" o = LookupTableGetOrientationMethodInfo
ResolveLookupTableMethod "getPageSize" o = LookupTableGetPageSizeMethodInfo
ResolveLookupTableMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveLookupTableMethod "getQattachment" o = IBus.Serializable.SerializableGetQattachmentMethodInfo
ResolveLookupTableMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveLookupTableMethod "setCursorPos" o = LookupTableSetCursorPosMethodInfo
ResolveLookupTableMethod "setCursorVisible" o = LookupTableSetCursorVisibleMethodInfo
ResolveLookupTableMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveLookupTableMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveLookupTableMethod "setLabel" o = LookupTableSetLabelMethodInfo
ResolveLookupTableMethod "setOrientation" o = LookupTableSetOrientationMethodInfo
ResolveLookupTableMethod "setPageSize" o = LookupTableSetPageSizeMethodInfo
ResolveLookupTableMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveLookupTableMethod "setQattachment" o = IBus.Serializable.SerializableSetQattachmentMethodInfo
ResolveLookupTableMethod "setRound" o = LookupTableSetRoundMethodInfo
ResolveLookupTableMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveLookupTableMethod t LookupTable, O.MethodInfo info LookupTable p) => OL.IsLabel t (LookupTable -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList LookupTable
type instance O.AttributeList LookupTable = LookupTableAttributeList
type LookupTableAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList LookupTable = LookupTableSignalList
type LookupTableSignalList = ('[ '("destroy", IBus.Object.ObjectDestroySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "ibus_lookup_table_new" ibus_lookup_table_new ::
Word32 ->
Word32 ->
CInt ->
CInt ->
IO (Ptr LookupTable)
lookupTableNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word32
-> Word32
-> Bool
-> Bool
-> m LookupTable
lookupTableNew :: Word32 -> Word32 -> Bool -> Bool -> m LookupTable
lookupTableNew Word32
pageSize Word32
cursorPos Bool
cursorVisible Bool
round = IO LookupTable -> m LookupTable
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO LookupTable -> m LookupTable)
-> IO LookupTable -> m LookupTable
forall a b. (a -> b) -> a -> b
$ do
let cursorVisible' :: CInt
cursorVisible' = (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
cursorVisible
let round' :: CInt
round' = (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
round
Ptr LookupTable
result <- Word32 -> Word32 -> CInt -> CInt -> IO (Ptr LookupTable)
ibus_lookup_table_new Word32
pageSize Word32
cursorPos CInt
cursorVisible' CInt
round'
Text -> Ptr LookupTable -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"lookupTableNew" Ptr LookupTable
result
LookupTable
result' <- ((ManagedPtr LookupTable -> LookupTable)
-> Ptr LookupTable -> IO LookupTable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr LookupTable -> LookupTable
LookupTable) Ptr LookupTable
result
LookupTable -> IO LookupTable
forall (m :: * -> *) a. Monad m => a -> m a
return LookupTable
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ibus_lookup_table_append_candidate" ibus_lookup_table_append_candidate ::
Ptr LookupTable ->
Ptr IBus.Text.Text ->
IO ()
lookupTableAppendCandidate ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a, IBus.Text.IsText b) =>
a
-> b
-> m ()
lookupTableAppendCandidate :: a -> b -> m ()
lookupTableAppendCandidate a
table b
text = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr Text
text' <- b -> IO (Ptr Text)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
text
Ptr LookupTable -> Ptr Text -> IO ()
ibus_lookup_table_append_candidate Ptr LookupTable
table' Ptr Text
text'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
text
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LookupTableAppendCandidateMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsLookupTable a, IBus.Text.IsText b) => O.MethodInfo LookupTableAppendCandidateMethodInfo a signature where
overloadedMethod = lookupTableAppendCandidate
#endif
foreign import ccall "ibus_lookup_table_append_label" ibus_lookup_table_append_label ::
Ptr LookupTable ->
Ptr IBus.Text.Text ->
IO ()
lookupTableAppendLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a, IBus.Text.IsText b) =>
a
-> b
-> m ()
lookupTableAppendLabel :: a -> b -> m ()
lookupTableAppendLabel a
table b
text = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr Text
text' <- b -> IO (Ptr Text)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
text
Ptr LookupTable -> Ptr Text -> IO ()
ibus_lookup_table_append_label Ptr LookupTable
table' Ptr Text
text'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
text
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LookupTableAppendLabelMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsLookupTable a, IBus.Text.IsText b) => O.MethodInfo LookupTableAppendLabelMethodInfo a signature where
overloadedMethod = lookupTableAppendLabel
#endif
foreign import ccall "ibus_lookup_table_clear" ibus_lookup_table_clear ::
Ptr LookupTable ->
IO ()
lookupTableClear ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m ()
lookupTableClear :: a -> m ()
lookupTableClear a
table = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr LookupTable -> IO ()
ibus_lookup_table_clear Ptr LookupTable
table'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LookupTableClearMethodInfo
instance (signature ~ (m ()), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableClearMethodInfo a signature where
overloadedMethod = lookupTableClear
#endif
foreign import ccall "ibus_lookup_table_cursor_down" ibus_lookup_table_cursor_down ::
Ptr LookupTable ->
IO CInt
lookupTableCursorDown ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Bool
lookupTableCursorDown :: a -> m Bool
lookupTableCursorDown a
table = 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 LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
CInt
result <- Ptr LookupTable -> IO CInt
ibus_lookup_table_cursor_down Ptr LookupTable
table'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data LookupTableCursorDownMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableCursorDownMethodInfo a signature where
overloadedMethod = lookupTableCursorDown
#endif
foreign import ccall "ibus_lookup_table_cursor_up" ibus_lookup_table_cursor_up ::
Ptr LookupTable ->
IO CInt
lookupTableCursorUp ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Bool
lookupTableCursorUp :: a -> m Bool
lookupTableCursorUp a
table = 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 LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
CInt
result <- Ptr LookupTable -> IO CInt
ibus_lookup_table_cursor_up Ptr LookupTable
table'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data LookupTableCursorUpMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableCursorUpMethodInfo a signature where
overloadedMethod = lookupTableCursorUp
#endif
foreign import ccall "ibus_lookup_table_get_candidate" ibus_lookup_table_get_candidate ::
Ptr LookupTable ->
Word32 ->
IO (Ptr IBus.Text.Text)
lookupTableGetCandidate ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> Word32
-> m IBus.Text.Text
lookupTableGetCandidate :: a -> Word32 -> m Text
lookupTableGetCandidate a
table Word32
index = 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 LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr Text
result <- Ptr LookupTable -> Word32 -> IO (Ptr Text)
ibus_lookup_table_get_candidate Ptr LookupTable
table' Word32
index
Text -> Ptr Text -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"lookupTableGetCandidate" Ptr Text
result
Text
result' <- ((ManagedPtr Text -> Text) -> Ptr Text -> IO Text
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Text -> Text
IBus.Text.Text) Ptr Text
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data LookupTableGetCandidateMethodInfo
instance (signature ~ (Word32 -> m IBus.Text.Text), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableGetCandidateMethodInfo a signature where
overloadedMethod = lookupTableGetCandidate
#endif
foreign import ccall "ibus_lookup_table_get_cursor_in_page" ibus_lookup_table_get_cursor_in_page ::
Ptr LookupTable ->
IO Word32
lookupTableGetCursorInPage ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Word32
lookupTableGetCursorInPage :: a -> m Word32
lookupTableGetCursorInPage a
table = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Word32
result <- Ptr LookupTable -> IO Word32
ibus_lookup_table_get_cursor_in_page Ptr LookupTable
table'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data LookupTableGetCursorInPageMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableGetCursorInPageMethodInfo a signature where
overloadedMethod = lookupTableGetCursorInPage
#endif
foreign import ccall "ibus_lookup_table_get_cursor_pos" ibus_lookup_table_get_cursor_pos ::
Ptr LookupTable ->
IO Word32
lookupTableGetCursorPos ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Word32
lookupTableGetCursorPos :: a -> m Word32
lookupTableGetCursorPos a
table = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Word32
result <- Ptr LookupTable -> IO Word32
ibus_lookup_table_get_cursor_pos Ptr LookupTable
table'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data LookupTableGetCursorPosMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableGetCursorPosMethodInfo a signature where
overloadedMethod = lookupTableGetCursorPos
#endif
foreign import ccall "ibus_lookup_table_get_label" ibus_lookup_table_get_label ::
Ptr LookupTable ->
Word32 ->
IO (Ptr IBus.Text.Text)
lookupTableGetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> Word32
-> m IBus.Text.Text
lookupTableGetLabel :: a -> Word32 -> m Text
lookupTableGetLabel a
table Word32
index = 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 LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr Text
result <- Ptr LookupTable -> Word32 -> IO (Ptr Text)
ibus_lookup_table_get_label Ptr LookupTable
table' Word32
index
Text -> Ptr Text -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"lookupTableGetLabel" Ptr Text
result
Text
result' <- ((ManagedPtr Text -> Text) -> Ptr Text -> IO Text
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Text -> Text
IBus.Text.Text) Ptr Text
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data LookupTableGetLabelMethodInfo
instance (signature ~ (Word32 -> m IBus.Text.Text), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableGetLabelMethodInfo a signature where
overloadedMethod = lookupTableGetLabel
#endif
foreign import ccall "ibus_lookup_table_get_number_of_candidates" ibus_lookup_table_get_number_of_candidates ::
Ptr LookupTable ->
IO Word32
lookupTableGetNumberOfCandidates ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Word32
lookupTableGetNumberOfCandidates :: a -> m Word32
lookupTableGetNumberOfCandidates a
table = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Word32
result <- Ptr LookupTable -> IO Word32
ibus_lookup_table_get_number_of_candidates Ptr LookupTable
table'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data LookupTableGetNumberOfCandidatesMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableGetNumberOfCandidatesMethodInfo a signature where
overloadedMethod = lookupTableGetNumberOfCandidates
#endif
foreign import ccall "ibus_lookup_table_get_orientation" ibus_lookup_table_get_orientation ::
Ptr LookupTable ->
IO Int32
lookupTableGetOrientation ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Int32
lookupTableGetOrientation :: a -> m Int32
lookupTableGetOrientation a
table = 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 LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Int32
result <- Ptr LookupTable -> IO Int32
ibus_lookup_table_get_orientation Ptr LookupTable
table'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data LookupTableGetOrientationMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableGetOrientationMethodInfo a signature where
overloadedMethod = lookupTableGetOrientation
#endif
foreign import ccall "ibus_lookup_table_get_page_size" ibus_lookup_table_get_page_size ::
Ptr LookupTable ->
IO Word32
lookupTableGetPageSize ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Word32
lookupTableGetPageSize :: a -> m Word32
lookupTableGetPageSize a
table = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Word32
result <- Ptr LookupTable -> IO Word32
ibus_lookup_table_get_page_size Ptr LookupTable
table'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data LookupTableGetPageSizeMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableGetPageSizeMethodInfo a signature where
overloadedMethod = lookupTableGetPageSize
#endif
foreign import ccall "ibus_lookup_table_is_cursor_visible" ibus_lookup_table_is_cursor_visible ::
Ptr LookupTable ->
IO CInt
lookupTableIsCursorVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Bool
lookupTableIsCursorVisible :: a -> m Bool
lookupTableIsCursorVisible a
table = 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 LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
CInt
result <- Ptr LookupTable -> IO CInt
ibus_lookup_table_is_cursor_visible Ptr LookupTable
table'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data LookupTableIsCursorVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableIsCursorVisibleMethodInfo a signature where
overloadedMethod = lookupTableIsCursorVisible
#endif
foreign import ccall "ibus_lookup_table_is_round" ibus_lookup_table_is_round ::
Ptr LookupTable ->
IO CInt
lookupTableIsRound ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Bool
lookupTableIsRound :: a -> m Bool
lookupTableIsRound a
table = 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 LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
CInt
result <- Ptr LookupTable -> IO CInt
ibus_lookup_table_is_round Ptr LookupTable
table'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data LookupTableIsRoundMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableIsRoundMethodInfo a signature where
overloadedMethod = lookupTableIsRound
#endif
foreign import ccall "ibus_lookup_table_page_down" ibus_lookup_table_page_down ::
Ptr LookupTable ->
IO CInt
lookupTablePageDown ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Bool
lookupTablePageDown :: a -> m Bool
lookupTablePageDown a
table = 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 LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
CInt
result <- Ptr LookupTable -> IO CInt
ibus_lookup_table_page_down Ptr LookupTable
table'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data LookupTablePageDownMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTablePageDownMethodInfo a signature where
overloadedMethod = lookupTablePageDown
#endif
foreign import ccall "ibus_lookup_table_page_up" ibus_lookup_table_page_up ::
Ptr LookupTable ->
IO CInt
lookupTablePageUp ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> m Bool
lookupTablePageUp :: a -> m Bool
lookupTablePageUp a
table = 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 LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
CInt
result <- Ptr LookupTable -> IO CInt
ibus_lookup_table_page_up Ptr LookupTable
table'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data LookupTablePageUpMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTablePageUpMethodInfo a signature where
overloadedMethod = lookupTablePageUp
#endif
foreign import ccall "ibus_lookup_table_set_cursor_pos" ibus_lookup_table_set_cursor_pos ::
Ptr LookupTable ->
Word32 ->
IO ()
lookupTableSetCursorPos ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> Word32
-> m ()
lookupTableSetCursorPos :: a -> Word32 -> m ()
lookupTableSetCursorPos a
table Word32
cursorPos = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr LookupTable -> Word32 -> IO ()
ibus_lookup_table_set_cursor_pos Ptr LookupTable
table' Word32
cursorPos
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LookupTableSetCursorPosMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableSetCursorPosMethodInfo a signature where
overloadedMethod = lookupTableSetCursorPos
#endif
foreign import ccall "ibus_lookup_table_set_cursor_visible" ibus_lookup_table_set_cursor_visible ::
Ptr LookupTable ->
CInt ->
IO ()
lookupTableSetCursorVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> Bool
-> m ()
lookupTableSetCursorVisible :: a -> Bool -> m ()
lookupTableSetCursorVisible a
table Bool
visible = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
let visible' :: CInt
visible' = (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
visible
Ptr LookupTable -> CInt -> IO ()
ibus_lookup_table_set_cursor_visible Ptr LookupTable
table' CInt
visible'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LookupTableSetCursorVisibleMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableSetCursorVisibleMethodInfo a signature where
overloadedMethod = lookupTableSetCursorVisible
#endif
foreign import ccall "ibus_lookup_table_set_label" ibus_lookup_table_set_label ::
Ptr LookupTable ->
Word32 ->
Ptr IBus.Text.Text ->
IO ()
lookupTableSetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a, IBus.Text.IsText b) =>
a
-> Word32
-> b
-> m ()
lookupTableSetLabel :: a -> Word32 -> b -> m ()
lookupTableSetLabel a
table Word32
index b
text = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr Text
text' <- b -> IO (Ptr Text)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
text
Ptr LookupTable -> Word32 -> Ptr Text -> IO ()
ibus_lookup_table_set_label Ptr LookupTable
table' Word32
index Ptr Text
text'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
text
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LookupTableSetLabelMethodInfo
instance (signature ~ (Word32 -> b -> m ()), MonadIO m, IsLookupTable a, IBus.Text.IsText b) => O.MethodInfo LookupTableSetLabelMethodInfo a signature where
overloadedMethod = lookupTableSetLabel
#endif
foreign import ccall "ibus_lookup_table_set_orientation" ibus_lookup_table_set_orientation ::
Ptr LookupTable ->
Int32 ->
IO ()
lookupTableSetOrientation ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> Int32
-> m ()
lookupTableSetOrientation :: a -> Int32 -> m ()
lookupTableSetOrientation a
table Int32
orientation = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr LookupTable -> Int32 -> IO ()
ibus_lookup_table_set_orientation Ptr LookupTable
table' Int32
orientation
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LookupTableSetOrientationMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableSetOrientationMethodInfo a signature where
overloadedMethod = lookupTableSetOrientation
#endif
foreign import ccall "ibus_lookup_table_set_page_size" ibus_lookup_table_set_page_size ::
Ptr LookupTable ->
Word32 ->
IO ()
lookupTableSetPageSize ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> Word32
-> m ()
lookupTableSetPageSize :: a -> Word32 -> m ()
lookupTableSetPageSize a
table Word32
pageSize = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr LookupTable -> Word32 -> IO ()
ibus_lookup_table_set_page_size Ptr LookupTable
table' Word32
pageSize
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LookupTableSetPageSizeMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableSetPageSizeMethodInfo a signature where
overloadedMethod = lookupTableSetPageSize
#endif
foreign import ccall "ibus_lookup_table_set_round" ibus_lookup_table_set_round ::
Ptr LookupTable ->
CInt ->
IO ()
lookupTableSetRound ::
(B.CallStack.HasCallStack, MonadIO m, IsLookupTable a) =>
a
-> Bool
-> m ()
lookupTableSetRound :: a -> Bool -> m ()
lookupTableSetRound a
table Bool
round = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr LookupTable
table' <- a -> IO (Ptr LookupTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
let round' :: CInt
round' = (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
round
Ptr LookupTable -> CInt -> IO ()
ibus_lookup_table_set_round Ptr LookupTable
table' CInt
round'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LookupTableSetRoundMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsLookupTable a) => O.MethodInfo LookupTableSetRoundMethodInfo a signature where
overloadedMethod = lookupTableSetRound
#endif