{-# 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.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
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
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 :: (MIO.MonadIO m, IsLookupTable o) => o -> m LookupTable
toLookupTable :: forall (m :: * -> *) o.
(MonadIO m, IsLookupTable o) =>
o -> m LookupTable
toLookupTable = IO LookupTable -> m LookupTable
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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'
B.ManagedPtr.unsafeCastTo ManagedPtr LookupTable -> LookupTable
LookupTable
instance B.GValue.IsGValue (Maybe LookupTable) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ibus_lookup_table_get_type
gvalueSet_ :: Ptr GValue -> Maybe LookupTable -> IO ()
gvalueSet_ Ptr GValue
gv Maybe LookupTable
P.Nothing = Ptr GValue -> Ptr LookupTable -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr LookupTable
forall a. Ptr a
FP.nullPtr :: FP.Ptr LookupTable)
gvalueSet_ Ptr GValue
gv (P.Just LookupTable
obj) = LookupTable -> (Ptr LookupTable -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr LookupTable
obj (Ptr GValue -> Ptr LookupTable -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe LookupTable)
gvalueGet_ Ptr GValue
gv = do
Ptr LookupTable
ptr <- Ptr GValue -> IO (Ptr LookupTable)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr LookupTable)
if Ptr LookupTable
ptr Ptr LookupTable -> Ptr LookupTable -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr LookupTable
forall a. Ptr a
FP.nullPtr
then LookupTable -> Maybe LookupTable
forall a. a -> Maybe a
P.Just (LookupTable -> Maybe LookupTable)
-> IO LookupTable -> IO (Maybe LookupTable)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (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
else Maybe LookupTable -> IO (Maybe LookupTable)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe LookupTable
forall a. Maybe a
P.Nothing
#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.OverloadedMethod 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
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveLookupTableMethod t LookupTable, O.OverloadedMethod info LookupTable p, R.HasField t LookupTable p) => R.HasField t LookupTable p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveLookupTableMethod t LookupTable, O.OverloadedMethodInfo info LookupTable) => OL.IsLabel t (O.MethodProxy info LookupTable) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsLookupTable a, IsText b) =>
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.OverloadedMethod LookupTableAppendCandidateMethodInfo a signature where
overloadedMethod = lookupTableAppendCandidate
instance O.OverloadedMethodInfo LookupTableAppendCandidateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableAppendCandidate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsLookupTable a, IsText b) =>
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.OverloadedMethod LookupTableAppendLabelMethodInfo a signature where
overloadedMethod = lookupTableAppendLabel
instance O.OverloadedMethodInfo LookupTableAppendLabelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableAppendLabel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableClearMethodInfo a signature where
overloadedMethod = lookupTableClear
instance O.OverloadedMethodInfo LookupTableClearMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableClear",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableCursorDownMethodInfo a signature where
overloadedMethod = lookupTableCursorDown
instance O.OverloadedMethodInfo LookupTableCursorDownMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableCursorDown",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableCursorUpMethodInfo a signature where
overloadedMethod = lookupTableCursorUp
instance O.OverloadedMethodInfo LookupTableCursorUpMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableCursorUp",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableGetCandidateMethodInfo a signature where
overloadedMethod = lookupTableGetCandidate
instance O.OverloadedMethodInfo LookupTableGetCandidateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableGetCandidate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableGetCursorInPageMethodInfo a signature where
overloadedMethod = lookupTableGetCursorInPage
instance O.OverloadedMethodInfo LookupTableGetCursorInPageMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableGetCursorInPage",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableGetCursorPosMethodInfo a signature where
overloadedMethod = lookupTableGetCursorPos
instance O.OverloadedMethodInfo LookupTableGetCursorPosMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableGetCursorPos",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableGetLabelMethodInfo a signature where
overloadedMethod = lookupTableGetLabel
instance O.OverloadedMethodInfo LookupTableGetLabelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableGetLabel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableGetNumberOfCandidatesMethodInfo a signature where
overloadedMethod = lookupTableGetNumberOfCandidates
instance O.OverloadedMethodInfo LookupTableGetNumberOfCandidatesMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableGetNumberOfCandidates",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableGetOrientationMethodInfo a signature where
overloadedMethod = lookupTableGetOrientation
instance O.OverloadedMethodInfo LookupTableGetOrientationMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableGetOrientation",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableGetPageSizeMethodInfo a signature where
overloadedMethod = lookupTableGetPageSize
instance O.OverloadedMethodInfo LookupTableGetPageSizeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableGetPageSize",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableIsCursorVisibleMethodInfo a signature where
overloadedMethod = lookupTableIsCursorVisible
instance O.OverloadedMethodInfo LookupTableIsCursorVisibleMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableIsCursorVisible",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableIsRoundMethodInfo a signature where
overloadedMethod = lookupTableIsRound
instance O.OverloadedMethodInfo LookupTableIsRoundMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableIsRound",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTablePageDownMethodInfo a signature where
overloadedMethod = lookupTablePageDown
instance O.OverloadedMethodInfo LookupTablePageDownMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTablePageDown",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTablePageUpMethodInfo a signature where
overloadedMethod = lookupTablePageUp
instance O.OverloadedMethodInfo LookupTablePageUpMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTablePageUp",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableSetCursorPosMethodInfo a signature where
overloadedMethod = lookupTableSetCursorPos
instance O.OverloadedMethodInfo LookupTableSetCursorPosMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableSetCursorPos",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableSetCursorVisibleMethodInfo a signature where
overloadedMethod = lookupTableSetCursorVisible
instance O.OverloadedMethodInfo LookupTableSetCursorVisibleMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableSetCursorVisible",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsLookupTable a, IsText b) =>
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.OverloadedMethod LookupTableSetLabelMethodInfo a signature where
overloadedMethod = lookupTableSetLabel
instance O.OverloadedMethodInfo LookupTableSetLabelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableSetLabel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableSetOrientationMethodInfo a signature where
overloadedMethod = lookupTableSetOrientation
instance O.OverloadedMethodInfo LookupTableSetOrientationMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableSetOrientation",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableSetPageSizeMethodInfo a signature where
overloadedMethod = lookupTableSetPageSize
instance O.OverloadedMethodInfo LookupTableSetPageSizeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableSetPageSize",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLookupTable a) =>
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.OverloadedMethod LookupTableSetRoundMethodInfo a signature where
overloadedMethod = lookupTableSetRound
instance O.OverloadedMethodInfo LookupTableSetRoundMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.LookupTable.lookupTableSetRound",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-LookupTable.html#v:lookupTableSetRound"
}
#endif