{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.IBus.Objects.Property
(
Property(..) ,
IsProperty ,
toProperty ,
#if defined(ENABLE_OVERLOADING)
ResolvePropertyMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
PropertyGetIconMethodInfo ,
#endif
propertyGetIcon ,
#if defined(ENABLE_OVERLOADING)
PropertyGetKeyMethodInfo ,
#endif
propertyGetKey ,
#if defined(ENABLE_OVERLOADING)
PropertyGetLabelMethodInfo ,
#endif
propertyGetLabel ,
#if defined(ENABLE_OVERLOADING)
PropertyGetPropTypeMethodInfo ,
#endif
propertyGetPropType ,
#if defined(ENABLE_OVERLOADING)
PropertyGetSensitiveMethodInfo ,
#endif
propertyGetSensitive ,
#if defined(ENABLE_OVERLOADING)
PropertyGetStateMethodInfo ,
#endif
propertyGetState ,
#if defined(ENABLE_OVERLOADING)
PropertyGetSubPropsMethodInfo ,
#endif
propertyGetSubProps ,
#if defined(ENABLE_OVERLOADING)
PropertyGetSymbolMethodInfo ,
#endif
propertyGetSymbol ,
#if defined(ENABLE_OVERLOADING)
PropertyGetTooltipMethodInfo ,
#endif
propertyGetTooltip ,
#if defined(ENABLE_OVERLOADING)
PropertyGetVisibleMethodInfo ,
#endif
propertyGetVisible ,
propertyNew ,
#if defined(ENABLE_OVERLOADING)
PropertySetIconMethodInfo ,
#endif
propertySetIcon ,
#if defined(ENABLE_OVERLOADING)
PropertySetLabelMethodInfo ,
#endif
propertySetLabel ,
#if defined(ENABLE_OVERLOADING)
PropertySetSensitiveMethodInfo ,
#endif
propertySetSensitive ,
#if defined(ENABLE_OVERLOADING)
PropertySetStateMethodInfo ,
#endif
propertySetState ,
#if defined(ENABLE_OVERLOADING)
PropertySetSubPropsMethodInfo ,
#endif
propertySetSubProps ,
#if defined(ENABLE_OVERLOADING)
PropertySetSymbolMethodInfo ,
#endif
propertySetSymbol ,
#if defined(ENABLE_OVERLOADING)
PropertySetTooltipMethodInfo ,
#endif
propertySetTooltip ,
#if defined(ENABLE_OVERLOADING)
PropertySetVisibleMethodInfo ,
#endif
propertySetVisible ,
#if defined(ENABLE_OVERLOADING)
PropertyUpdateMethodInfo ,
#endif
propertyUpdate ,
#if defined(ENABLE_OVERLOADING)
PropertyIconPropertyInfo ,
#endif
constructPropertyIcon ,
getPropertyIcon ,
#if defined(ENABLE_OVERLOADING)
propertyIcon ,
#endif
setPropertyIcon ,
#if defined(ENABLE_OVERLOADING)
PropertyKeyPropertyInfo ,
#endif
constructPropertyKey ,
getPropertyKey ,
#if defined(ENABLE_OVERLOADING)
propertyKey ,
#endif
#if defined(ENABLE_OVERLOADING)
PropertyLabelPropertyInfo ,
#endif
constructPropertyLabel ,
getPropertyLabel ,
#if defined(ENABLE_OVERLOADING)
propertyLabel ,
#endif
setPropertyLabel ,
#if defined(ENABLE_OVERLOADING)
PropertyPropTypePropertyInfo ,
#endif
constructPropertyPropType ,
getPropertyPropType ,
#if defined(ENABLE_OVERLOADING)
propertyPropType ,
#endif
#if defined(ENABLE_OVERLOADING)
PropertySensitivePropertyInfo ,
#endif
constructPropertySensitive ,
getPropertySensitive ,
#if defined(ENABLE_OVERLOADING)
propertySensitive ,
#endif
setPropertySensitive ,
#if defined(ENABLE_OVERLOADING)
PropertyStatePropertyInfo ,
#endif
constructPropertyState ,
getPropertyState ,
#if defined(ENABLE_OVERLOADING)
propertyState ,
#endif
setPropertyState ,
#if defined(ENABLE_OVERLOADING)
PropertySubPropsPropertyInfo ,
#endif
constructPropertySubProps ,
getPropertySubProps ,
#if defined(ENABLE_OVERLOADING)
propertySubProps ,
#endif
setPropertySubProps ,
#if defined(ENABLE_OVERLOADING)
PropertySymbolPropertyInfo ,
#endif
constructPropertySymbol ,
getPropertySymbol ,
#if defined(ENABLE_OVERLOADING)
propertySymbol ,
#endif
setPropertySymbol ,
#if defined(ENABLE_OVERLOADING)
PropertyTooltipPropertyInfo ,
#endif
constructPropertyTooltip ,
getPropertyTooltip ,
#if defined(ENABLE_OVERLOADING)
propertyTooltip ,
#endif
setPropertyTooltip ,
#if defined(ENABLE_OVERLOADING)
PropertyVisiblePropertyInfo ,
#endif
constructPropertyVisible ,
getPropertyVisible ,
#if defined(ENABLE_OVERLOADING)
propertyVisible ,
#endif
setPropertyVisible ,
) 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.Enums as IBus.Enums
import {-# SOURCE #-} qualified GI.IBus.Objects.Object as IBus.Object
import {-# SOURCE #-} qualified GI.IBus.Objects.PropList as IBus.PropList
import {-# SOURCE #-} qualified GI.IBus.Objects.Serializable as IBus.Serializable
import {-# SOURCE #-} qualified GI.IBus.Objects.Text as IBus.Text
newtype Property = Property (SP.ManagedPtr Property)
deriving (Property -> Property -> Bool
(Property -> Property -> Bool)
-> (Property -> Property -> Bool) -> Eq Property
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Property -> Property -> Bool
$c/= :: Property -> Property -> Bool
== :: Property -> Property -> Bool
$c== :: Property -> Property -> Bool
Eq)
instance SP.ManagedPtrNewtype Property where
toManagedPtr :: Property -> ManagedPtr Property
toManagedPtr (Property ManagedPtr Property
p) = ManagedPtr Property
p
foreign import ccall "ibus_property_get_type"
c_ibus_property_get_type :: IO B.Types.GType
instance B.Types.TypedObject Property where
glibType :: IO GType
glibType = IO GType
c_ibus_property_get_type
instance B.Types.GObject Property
class (SP.GObject o, O.IsDescendantOf Property o) => IsProperty o
instance (SP.GObject o, O.IsDescendantOf Property o) => IsProperty o
instance O.HasParentTypes Property
type instance O.ParentTypes Property = '[IBus.Serializable.Serializable, IBus.Object.Object, GObject.Object.Object]
toProperty :: (MIO.MonadIO m, IsProperty o) => o -> m Property
toProperty :: forall (m :: * -> *) o.
(MonadIO m, IsProperty o) =>
o -> m Property
toProperty = IO Property -> m Property
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Property -> m Property)
-> (o -> IO Property) -> o -> m Property
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Property -> Property) -> o -> IO Property
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Property -> Property
Property
instance B.GValue.IsGValue (Maybe Property) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ibus_property_get_type
gvalueSet_ :: Ptr GValue -> Maybe Property -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Property
P.Nothing = Ptr GValue -> Ptr Property -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Property
forall a. Ptr a
FP.nullPtr :: FP.Ptr Property)
gvalueSet_ Ptr GValue
gv (P.Just Property
obj) = Property -> (Ptr Property -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Property
obj (Ptr GValue -> Ptr Property -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Property)
gvalueGet_ Ptr GValue
gv = do
Ptr Property
ptr <- Ptr GValue -> IO (Ptr Property)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Property)
if Ptr Property
ptr Ptr Property -> Ptr Property -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Property
forall a. Ptr a
FP.nullPtr
then Property -> Maybe Property
forall a. a -> Maybe a
P.Just (Property -> Maybe Property) -> IO Property -> IO (Maybe Property)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Property -> Property) -> Ptr Property -> IO Property
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Property -> Property
Property Ptr Property
ptr
else Maybe Property -> IO (Maybe Property)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Property
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolvePropertyMethod (t :: Symbol) (o :: *) :: * where
ResolvePropertyMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolvePropertyMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolvePropertyMethod "copy" o = IBus.Serializable.SerializableCopyMethodInfo
ResolvePropertyMethod "destroy" o = IBus.Object.ObjectDestroyMethodInfo
ResolvePropertyMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolvePropertyMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolvePropertyMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolvePropertyMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolvePropertyMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolvePropertyMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolvePropertyMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolvePropertyMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolvePropertyMethod "removeQattachment" o = IBus.Serializable.SerializableRemoveQattachmentMethodInfo
ResolvePropertyMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolvePropertyMethod "serializeObject" o = IBus.Serializable.SerializableSerializeObjectMethodInfo
ResolvePropertyMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolvePropertyMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolvePropertyMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolvePropertyMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolvePropertyMethod "update" o = PropertyUpdateMethodInfo
ResolvePropertyMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolvePropertyMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolvePropertyMethod "getIcon" o = PropertyGetIconMethodInfo
ResolvePropertyMethod "getKey" o = PropertyGetKeyMethodInfo
ResolvePropertyMethod "getLabel" o = PropertyGetLabelMethodInfo
ResolvePropertyMethod "getPropType" o = PropertyGetPropTypeMethodInfo
ResolvePropertyMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolvePropertyMethod "getQattachment" o = IBus.Serializable.SerializableGetQattachmentMethodInfo
ResolvePropertyMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolvePropertyMethod "getSensitive" o = PropertyGetSensitiveMethodInfo
ResolvePropertyMethod "getState" o = PropertyGetStateMethodInfo
ResolvePropertyMethod "getSubProps" o = PropertyGetSubPropsMethodInfo
ResolvePropertyMethod "getSymbol" o = PropertyGetSymbolMethodInfo
ResolvePropertyMethod "getTooltip" o = PropertyGetTooltipMethodInfo
ResolvePropertyMethod "getVisible" o = PropertyGetVisibleMethodInfo
ResolvePropertyMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolvePropertyMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolvePropertyMethod "setIcon" o = PropertySetIconMethodInfo
ResolvePropertyMethod "setLabel" o = PropertySetLabelMethodInfo
ResolvePropertyMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolvePropertyMethod "setQattachment" o = IBus.Serializable.SerializableSetQattachmentMethodInfo
ResolvePropertyMethod "setSensitive" o = PropertySetSensitiveMethodInfo
ResolvePropertyMethod "setState" o = PropertySetStateMethodInfo
ResolvePropertyMethod "setSubProps" o = PropertySetSubPropsMethodInfo
ResolvePropertyMethod "setSymbol" o = PropertySetSymbolMethodInfo
ResolvePropertyMethod "setTooltip" o = PropertySetTooltipMethodInfo
ResolvePropertyMethod "setVisible" o = PropertySetVisibleMethodInfo
ResolvePropertyMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePropertyMethod t Property, O.OverloadedMethod info Property p) => OL.IsLabel t (Property -> 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 ~ ResolvePropertyMethod t Property, O.OverloadedMethod info Property p, R.HasField t Property p) => R.HasField t Property p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolvePropertyMethod t Property, O.OverloadedMethodInfo info Property) => OL.IsLabel t (O.MethodProxy info Property) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getPropertyIcon :: (MonadIO m, IsProperty o) => o -> m T.Text
getPropertyIcon :: forall (m :: * -> *) o. (MonadIO m, IsProperty o) => o -> m Text
getPropertyIcon o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getPropertyIcon" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"icon"
setPropertyIcon :: (MonadIO m, IsProperty o) => o -> T.Text -> m ()
setPropertyIcon :: forall (m :: * -> *) o.
(MonadIO m, IsProperty o) =>
o -> Text -> m ()
setPropertyIcon o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"icon" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructPropertyIcon :: (IsProperty o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructPropertyIcon :: forall o (m :: * -> *).
(IsProperty o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructPropertyIcon Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"icon" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data PropertyIconPropertyInfo
instance AttrInfo PropertyIconPropertyInfo where
type AttrAllowedOps PropertyIconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PropertyIconPropertyInfo = IsProperty
type AttrSetTypeConstraint PropertyIconPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint PropertyIconPropertyInfo = (~) T.Text
type AttrTransferType PropertyIconPropertyInfo = T.Text
type AttrGetType PropertyIconPropertyInfo = T.Text
type AttrLabel PropertyIconPropertyInfo = "icon"
type AttrOrigin PropertyIconPropertyInfo = Property
attrGet = getPropertyIcon
attrSet = setPropertyIcon
attrTransfer _ v = do
return v
attrConstruct = constructPropertyIcon
attrClear = undefined
#endif
getPropertyKey :: (MonadIO m, IsProperty o) => o -> m T.Text
getPropertyKey :: forall (m :: * -> *) o. (MonadIO m, IsProperty o) => o -> m Text
getPropertyKey o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getPropertyKey" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"key"
constructPropertyKey :: (IsProperty o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructPropertyKey :: forall o (m :: * -> *).
(IsProperty o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructPropertyKey Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"key" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data PropertyKeyPropertyInfo
instance AttrInfo PropertyKeyPropertyInfo where
type AttrAllowedOps PropertyKeyPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint PropertyKeyPropertyInfo = IsProperty
type AttrSetTypeConstraint PropertyKeyPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint PropertyKeyPropertyInfo = (~) T.Text
type AttrTransferType PropertyKeyPropertyInfo = T.Text
type AttrGetType PropertyKeyPropertyInfo = T.Text
type AttrLabel PropertyKeyPropertyInfo = "key"
type AttrOrigin PropertyKeyPropertyInfo = Property
attrGet = getPropertyKey
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructPropertyKey
attrClear = undefined
#endif
getPropertyLabel :: (MonadIO m, IsProperty o) => o -> m IBus.Text.Text
getPropertyLabel :: forall (m :: * -> *) o. (MonadIO m, IsProperty o) => o -> m Text
getPropertyLabel o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getPropertyLabel" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Text -> Text) -> IO (Maybe Text)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"label" ManagedPtr Text -> Text
IBus.Text.Text
setPropertyLabel :: (MonadIO m, IsProperty o, IBus.Text.IsText a) => o -> a -> m ()
setPropertyLabel :: forall (m :: * -> *) o a.
(MonadIO m, IsProperty o, IsText a) =>
o -> a -> m ()
setPropertyLabel o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"label" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructPropertyLabel :: (IsProperty o, MIO.MonadIO m, IBus.Text.IsText a) => a -> m (GValueConstruct o)
constructPropertyLabel :: forall o (m :: * -> *) a.
(IsProperty o, MonadIO m, IsText a) =>
a -> m (GValueConstruct o)
constructPropertyLabel a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"label" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data PropertyLabelPropertyInfo
instance AttrInfo PropertyLabelPropertyInfo where
type AttrAllowedOps PropertyLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PropertyLabelPropertyInfo = IsProperty
type AttrSetTypeConstraint PropertyLabelPropertyInfo = IBus.Text.IsText
type AttrTransferTypeConstraint PropertyLabelPropertyInfo = IBus.Text.IsText
type AttrTransferType PropertyLabelPropertyInfo = IBus.Text.Text
type AttrGetType PropertyLabelPropertyInfo = IBus.Text.Text
type AttrLabel PropertyLabelPropertyInfo = "label"
type AttrOrigin PropertyLabelPropertyInfo = Property
attrGet = getPropertyLabel
attrSet = setPropertyLabel
attrTransfer _ v = do
unsafeCastTo IBus.Text.Text v
attrConstruct = constructPropertyLabel
attrClear = undefined
#endif
getPropertyPropType :: (MonadIO m, IsProperty o) => o -> m IBus.Enums.PropType
getPropertyPropType :: forall (m :: * -> *) o.
(MonadIO m, IsProperty o) =>
o -> m PropType
getPropertyPropType o
obj = IO PropType -> m PropType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO PropType -> m PropType) -> IO PropType -> m PropType
forall a b. (a -> b) -> a -> b
$ o -> String -> IO PropType
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"prop-type"
constructPropertyPropType :: (IsProperty o, MIO.MonadIO m) => IBus.Enums.PropType -> m (GValueConstruct o)
constructPropertyPropType :: forall o (m :: * -> *).
(IsProperty o, MonadIO m) =>
PropType -> m (GValueConstruct o)
constructPropertyPropType PropType
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> PropType -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"prop-type" PropType
val
#if defined(ENABLE_OVERLOADING)
data PropertyPropTypePropertyInfo
instance AttrInfo PropertyPropTypePropertyInfo where
type AttrAllowedOps PropertyPropTypePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PropertyPropTypePropertyInfo = IsProperty
type AttrSetTypeConstraint PropertyPropTypePropertyInfo = (~) IBus.Enums.PropType
type AttrTransferTypeConstraint PropertyPropTypePropertyInfo = (~) IBus.Enums.PropType
type AttrTransferType PropertyPropTypePropertyInfo = IBus.Enums.PropType
type AttrGetType PropertyPropTypePropertyInfo = IBus.Enums.PropType
type AttrLabel PropertyPropTypePropertyInfo = "prop-type"
type AttrOrigin PropertyPropTypePropertyInfo = Property
attrGet = getPropertyPropType
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructPropertyPropType
attrClear = undefined
#endif
getPropertySensitive :: (MonadIO m, IsProperty o) => o -> m Bool
getPropertySensitive :: forall (m :: * -> *) o. (MonadIO m, IsProperty o) => o -> m Bool
getPropertySensitive o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"sensitive"
setPropertySensitive :: (MonadIO m, IsProperty o) => o -> Bool -> m ()
setPropertySensitive :: forall (m :: * -> *) o.
(MonadIO m, IsProperty o) =>
o -> Bool -> m ()
setPropertySensitive o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"sensitive" Bool
val
constructPropertySensitive :: (IsProperty o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructPropertySensitive :: forall o (m :: * -> *).
(IsProperty o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructPropertySensitive Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"sensitive" Bool
val
#if defined(ENABLE_OVERLOADING)
data PropertySensitivePropertyInfo
instance AttrInfo PropertySensitivePropertyInfo where
type AttrAllowedOps PropertySensitivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PropertySensitivePropertyInfo = IsProperty
type AttrSetTypeConstraint PropertySensitivePropertyInfo = (~) Bool
type AttrTransferTypeConstraint PropertySensitivePropertyInfo = (~) Bool
type AttrTransferType PropertySensitivePropertyInfo = Bool
type AttrGetType PropertySensitivePropertyInfo = Bool
type AttrLabel PropertySensitivePropertyInfo = "sensitive"
type AttrOrigin PropertySensitivePropertyInfo = Property
attrGet = getPropertySensitive
attrSet = setPropertySensitive
attrTransfer _ v = do
return v
attrConstruct = constructPropertySensitive
attrClear = undefined
#endif
getPropertyState :: (MonadIO m, IsProperty o) => o -> m IBus.Enums.PropState
getPropertyState :: forall (m :: * -> *) o.
(MonadIO m, IsProperty o) =>
o -> m PropState
getPropertyState o
obj = IO PropState -> m PropState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO PropState -> m PropState) -> IO PropState -> m PropState
forall a b. (a -> b) -> a -> b
$ o -> String -> IO PropState
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"state"
setPropertyState :: (MonadIO m, IsProperty o) => o -> IBus.Enums.PropState -> m ()
setPropertyState :: forall (m :: * -> *) o.
(MonadIO m, IsProperty o) =>
o -> PropState -> m ()
setPropertyState o
obj PropState
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> PropState -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"state" PropState
val
constructPropertyState :: (IsProperty o, MIO.MonadIO m) => IBus.Enums.PropState -> m (GValueConstruct o)
constructPropertyState :: forall o (m :: * -> *).
(IsProperty o, MonadIO m) =>
PropState -> m (GValueConstruct o)
constructPropertyState PropState
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> PropState -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"state" PropState
val
#if defined(ENABLE_OVERLOADING)
data PropertyStatePropertyInfo
instance AttrInfo PropertyStatePropertyInfo where
type AttrAllowedOps PropertyStatePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PropertyStatePropertyInfo = IsProperty
type AttrSetTypeConstraint PropertyStatePropertyInfo = (~) IBus.Enums.PropState
type AttrTransferTypeConstraint PropertyStatePropertyInfo = (~) IBus.Enums.PropState
type AttrTransferType PropertyStatePropertyInfo = IBus.Enums.PropState
type AttrGetType PropertyStatePropertyInfo = IBus.Enums.PropState
type AttrLabel PropertyStatePropertyInfo = "state"
type AttrOrigin PropertyStatePropertyInfo = Property
attrGet = getPropertyState
attrSet = setPropertyState
attrTransfer _ v = do
return v
attrConstruct = constructPropertyState
attrClear = undefined
#endif
getPropertySubProps :: (MonadIO m, IsProperty o) => o -> m IBus.PropList.PropList
getPropertySubProps :: forall (m :: * -> *) o.
(MonadIO m, IsProperty o) =>
o -> m PropList
getPropertySubProps o
obj = IO PropList -> m PropList
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO PropList -> m PropList) -> IO PropList -> m PropList
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe PropList) -> IO PropList
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getPropertySubProps" (IO (Maybe PropList) -> IO PropList)
-> IO (Maybe PropList) -> IO PropList
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr PropList -> PropList)
-> IO (Maybe PropList)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"sub-props" ManagedPtr PropList -> PropList
IBus.PropList.PropList
setPropertySubProps :: (MonadIO m, IsProperty o, IBus.PropList.IsPropList a) => o -> a -> m ()
setPropertySubProps :: forall (m :: * -> *) o a.
(MonadIO m, IsProperty o, IsPropList a) =>
o -> a -> m ()
setPropertySubProps o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"sub-props" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructPropertySubProps :: (IsProperty o, MIO.MonadIO m, IBus.PropList.IsPropList a) => a -> m (GValueConstruct o)
constructPropertySubProps :: forall o (m :: * -> *) a.
(IsProperty o, MonadIO m, IsPropList a) =>
a -> m (GValueConstruct o)
constructPropertySubProps a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"sub-props" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data PropertySubPropsPropertyInfo
instance AttrInfo PropertySubPropsPropertyInfo where
type AttrAllowedOps PropertySubPropsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PropertySubPropsPropertyInfo = IsProperty
type AttrSetTypeConstraint PropertySubPropsPropertyInfo = IBus.PropList.IsPropList
type AttrTransferTypeConstraint PropertySubPropsPropertyInfo = IBus.PropList.IsPropList
type AttrTransferType PropertySubPropsPropertyInfo = IBus.PropList.PropList
type AttrGetType PropertySubPropsPropertyInfo = IBus.PropList.PropList
type AttrLabel PropertySubPropsPropertyInfo = "sub-props"
type AttrOrigin PropertySubPropsPropertyInfo = Property
attrGet = getPropertySubProps
attrSet = setPropertySubProps
attrTransfer _ v = do
unsafeCastTo IBus.PropList.PropList v
attrConstruct = constructPropertySubProps
attrClear = undefined
#endif
getPropertySymbol :: (MonadIO m, IsProperty o) => o -> m IBus.Text.Text
getPropertySymbol :: forall (m :: * -> *) o. (MonadIO m, IsProperty o) => o -> m Text
getPropertySymbol o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getPropertySymbol" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Text -> Text) -> IO (Maybe Text)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"symbol" ManagedPtr Text -> Text
IBus.Text.Text
setPropertySymbol :: (MonadIO m, IsProperty o, IBus.Text.IsText a) => o -> a -> m ()
setPropertySymbol :: forall (m :: * -> *) o a.
(MonadIO m, IsProperty o, IsText a) =>
o -> a -> m ()
setPropertySymbol o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"symbol" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructPropertySymbol :: (IsProperty o, MIO.MonadIO m, IBus.Text.IsText a) => a -> m (GValueConstruct o)
constructPropertySymbol :: forall o (m :: * -> *) a.
(IsProperty o, MonadIO m, IsText a) =>
a -> m (GValueConstruct o)
constructPropertySymbol a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"symbol" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data PropertySymbolPropertyInfo
instance AttrInfo PropertySymbolPropertyInfo where
type AttrAllowedOps PropertySymbolPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PropertySymbolPropertyInfo = IsProperty
type AttrSetTypeConstraint PropertySymbolPropertyInfo = IBus.Text.IsText
type AttrTransferTypeConstraint PropertySymbolPropertyInfo = IBus.Text.IsText
type AttrTransferType PropertySymbolPropertyInfo = IBus.Text.Text
type AttrGetType PropertySymbolPropertyInfo = IBus.Text.Text
type AttrLabel PropertySymbolPropertyInfo = "symbol"
type AttrOrigin PropertySymbolPropertyInfo = Property
attrGet = getPropertySymbol
attrSet = setPropertySymbol
attrTransfer _ v = do
unsafeCastTo IBus.Text.Text v
attrConstruct = constructPropertySymbol
attrClear = undefined
#endif
getPropertyTooltip :: (MonadIO m, IsProperty o) => o -> m IBus.Text.Text
getPropertyTooltip :: forall (m :: * -> *) o. (MonadIO m, IsProperty o) => o -> m Text
getPropertyTooltip o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getPropertyTooltip" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Text -> Text) -> IO (Maybe Text)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"tooltip" ManagedPtr Text -> Text
IBus.Text.Text
setPropertyTooltip :: (MonadIO m, IsProperty o, IBus.Text.IsText a) => o -> a -> m ()
setPropertyTooltip :: forall (m :: * -> *) o a.
(MonadIO m, IsProperty o, IsText a) =>
o -> a -> m ()
setPropertyTooltip o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"tooltip" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructPropertyTooltip :: (IsProperty o, MIO.MonadIO m, IBus.Text.IsText a) => a -> m (GValueConstruct o)
constructPropertyTooltip :: forall o (m :: * -> *) a.
(IsProperty o, MonadIO m, IsText a) =>
a -> m (GValueConstruct o)
constructPropertyTooltip a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"tooltip" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data PropertyTooltipPropertyInfo
instance AttrInfo PropertyTooltipPropertyInfo where
type AttrAllowedOps PropertyTooltipPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PropertyTooltipPropertyInfo = IsProperty
type AttrSetTypeConstraint PropertyTooltipPropertyInfo = IBus.Text.IsText
type AttrTransferTypeConstraint PropertyTooltipPropertyInfo = IBus.Text.IsText
type AttrTransferType PropertyTooltipPropertyInfo = IBus.Text.Text
type AttrGetType PropertyTooltipPropertyInfo = IBus.Text.Text
type AttrLabel PropertyTooltipPropertyInfo = "tooltip"
type AttrOrigin PropertyTooltipPropertyInfo = Property
attrGet = getPropertyTooltip
attrSet = setPropertyTooltip
attrTransfer _ v = do
unsafeCastTo IBus.Text.Text v
attrConstruct = constructPropertyTooltip
attrClear = undefined
#endif
getPropertyVisible :: (MonadIO m, IsProperty o) => o -> m Bool
getPropertyVisible :: forall (m :: * -> *) o. (MonadIO m, IsProperty o) => o -> m Bool
getPropertyVisible o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"visible"
setPropertyVisible :: (MonadIO m, IsProperty o) => o -> Bool -> m ()
setPropertyVisible :: forall (m :: * -> *) o.
(MonadIO m, IsProperty o) =>
o -> Bool -> m ()
setPropertyVisible o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"visible" Bool
val
constructPropertyVisible :: (IsProperty o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructPropertyVisible :: forall o (m :: * -> *).
(IsProperty o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructPropertyVisible Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"visible" Bool
val
#if defined(ENABLE_OVERLOADING)
data PropertyVisiblePropertyInfo
instance AttrInfo PropertyVisiblePropertyInfo where
type AttrAllowedOps PropertyVisiblePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint PropertyVisiblePropertyInfo = IsProperty
type AttrSetTypeConstraint PropertyVisiblePropertyInfo = (~) Bool
type AttrTransferTypeConstraint PropertyVisiblePropertyInfo = (~) Bool
type AttrTransferType PropertyVisiblePropertyInfo = Bool
type AttrGetType PropertyVisiblePropertyInfo = Bool
type AttrLabel PropertyVisiblePropertyInfo = "visible"
type AttrOrigin PropertyVisiblePropertyInfo = Property
attrGet = getPropertyVisible
attrSet = setPropertyVisible
attrTransfer _ v = do
return v
attrConstruct = constructPropertyVisible
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Property
type instance O.AttributeList Property = PropertyAttributeList
type PropertyAttributeList = ('[ '("icon", PropertyIconPropertyInfo), '("key", PropertyKeyPropertyInfo), '("label", PropertyLabelPropertyInfo), '("propType", PropertyPropTypePropertyInfo), '("sensitive", PropertySensitivePropertyInfo), '("state", PropertyStatePropertyInfo), '("subProps", PropertySubPropsPropertyInfo), '("symbol", PropertySymbolPropertyInfo), '("tooltip", PropertyTooltipPropertyInfo), '("visible", PropertyVisiblePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
propertyIcon :: AttrLabelProxy "icon"
propertyIcon = AttrLabelProxy
propertyKey :: AttrLabelProxy "key"
propertyKey = AttrLabelProxy
propertyLabel :: AttrLabelProxy "label"
propertyLabel = AttrLabelProxy
propertyPropType :: AttrLabelProxy "propType"
propertyPropType = AttrLabelProxy
propertySensitive :: AttrLabelProxy "sensitive"
propertySensitive = AttrLabelProxy
propertyState :: AttrLabelProxy "state"
propertyState = AttrLabelProxy
propertySubProps :: AttrLabelProxy "subProps"
propertySubProps = AttrLabelProxy
propertySymbol :: AttrLabelProxy "symbol"
propertySymbol = AttrLabelProxy
propertyTooltip :: AttrLabelProxy "tooltip"
propertyTooltip = AttrLabelProxy
propertyVisible :: AttrLabelProxy "visible"
propertyVisible = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Property = PropertySignalList
type PropertySignalList = ('[ '("destroy", IBus.Object.ObjectDestroySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "ibus_property_new" ibus_property_new ::
CString ->
CUInt ->
Ptr IBus.Text.Text ->
CString ->
Ptr IBus.Text.Text ->
CInt ->
CInt ->
CUInt ->
Ptr IBus.PropList.PropList ->
IO (Ptr Property)
propertyNew ::
(B.CallStack.HasCallStack, MonadIO m, IBus.Text.IsText a, IBus.Text.IsText b, IBus.PropList.IsPropList c) =>
T.Text
-> IBus.Enums.PropType
-> a
-> Maybe (T.Text)
-> b
-> Bool
-> Bool
-> IBus.Enums.PropState
-> Maybe (c)
-> m Property
propertyNew :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsText a, IsText b, IsPropList c) =>
Text
-> PropType
-> a
-> Maybe Text
-> b
-> Bool
-> Bool
-> PropState
-> Maybe c
-> m Property
propertyNew Text
key PropType
type_ a
label Maybe Text
icon b
tooltip Bool
sensitive Bool
visible PropState
state Maybe c
propList = IO Property -> m Property
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Property -> m Property) -> IO Property -> m Property
forall a b. (a -> b) -> a -> b
$ do
CString
key' <- Text -> IO CString
textToCString Text
key
let type_' :: CUInt
type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PropType -> Int) -> PropType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PropType -> Int
forall a. Enum a => a -> Int
fromEnum) PropType
type_
Ptr Text
label' <- a -> IO (Ptr Text)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
label
CString
maybeIcon <- case Maybe Text
icon of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jIcon -> do
CString
jIcon' <- Text -> IO CString
textToCString Text
jIcon
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jIcon'
Ptr Text
tooltip' <- b -> IO (Ptr Text)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
tooltip
let sensitive' :: CInt
sensitive' = (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
sensitive
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
let state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PropState -> Int) -> PropState -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PropState -> Int
forall a. Enum a => a -> Int
fromEnum) PropState
state
Ptr PropList
maybePropList <- case Maybe c
propList of
Maybe c
Nothing -> Ptr PropList -> IO (Ptr PropList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr PropList
forall a. Ptr a
nullPtr
Just c
jPropList -> do
Ptr PropList
jPropList' <- c -> IO (Ptr PropList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jPropList
Ptr PropList -> IO (Ptr PropList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr PropList
jPropList'
Ptr Property
result <- CString
-> CUInt
-> Ptr Text
-> CString
-> Ptr Text
-> CInt
-> CInt
-> CUInt
-> Ptr PropList
-> IO (Ptr Property)
ibus_property_new CString
key' CUInt
type_' Ptr Text
label' CString
maybeIcon Ptr Text
tooltip' CInt
sensitive' CInt
visible' CUInt
state' Ptr PropList
maybePropList
Text -> Ptr Property -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"propertyNew" Ptr Property
result
Property
result' <- ((ManagedPtr Property -> Property) -> Ptr Property -> IO Property
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Property -> Property
Property) Ptr Property
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
label
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
tooltip
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
propList c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeIcon
Property -> IO Property
forall (m :: * -> *) a. Monad m => a -> m a
return Property
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ibus_property_get_icon" ibus_property_get_icon ::
Ptr Property ->
IO CString
propertyGetIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m T.Text
propertyGetIcon :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m Text
propertyGetIcon a
prop = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
CString
result <- Ptr Property -> IO CString
ibus_property_get_icon Ptr Property
prop'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"propertyGetIcon" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetIconMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetIconMethodInfo a signature where
overloadedMethod = propertyGetIcon
instance O.OverloadedMethodInfo PropertyGetIconMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetIcon",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetIcon"
}
#endif
foreign import ccall "ibus_property_get_key" ibus_property_get_key ::
Ptr Property ->
IO CString
propertyGetKey ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m T.Text
propertyGetKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m Text
propertyGetKey a
prop = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
CString
result <- Ptr Property -> IO CString
ibus_property_get_key Ptr Property
prop'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"propertyGetKey" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetKeyMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetKeyMethodInfo a signature where
overloadedMethod = propertyGetKey
instance O.OverloadedMethodInfo PropertyGetKeyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetKey",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetKey"
}
#endif
foreign import ccall "ibus_property_get_label" ibus_property_get_label ::
Ptr Property ->
IO (Ptr IBus.Text.Text)
propertyGetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m IBus.Text.Text
propertyGetLabel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m Text
propertyGetLabel a
prop = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
Ptr Text
result <- Ptr Property -> IO (Ptr Text)
ibus_property_get_label Ptr Property
prop'
Text -> Ptr Text -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"propertyGetLabel" 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
prop
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetLabelMethodInfo
instance (signature ~ (m IBus.Text.Text), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetLabelMethodInfo a signature where
overloadedMethod = propertyGetLabel
instance O.OverloadedMethodInfo PropertyGetLabelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetLabel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetLabel"
}
#endif
foreign import ccall "ibus_property_get_prop_type" ibus_property_get_prop_type ::
Ptr Property ->
IO CUInt
propertyGetPropType ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m IBus.Enums.PropType
propertyGetPropType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m PropType
propertyGetPropType a
prop = IO PropType -> m PropType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PropType -> m PropType) -> IO PropType -> m PropType
forall a b. (a -> b) -> a -> b
$ do
Ptr Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
CUInt
result <- Ptr Property -> IO CUInt
ibus_property_get_prop_type Ptr Property
prop'
let result' :: PropType
result' = (Int -> PropType
forall a. Enum a => Int -> a
toEnum (Int -> PropType) -> (CUInt -> Int) -> CUInt -> PropType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
PropType -> IO PropType
forall (m :: * -> *) a. Monad m => a -> m a
return PropType
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetPropTypeMethodInfo
instance (signature ~ (m IBus.Enums.PropType), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetPropTypeMethodInfo a signature where
overloadedMethod = propertyGetPropType
instance O.OverloadedMethodInfo PropertyGetPropTypeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetPropType",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetPropType"
}
#endif
foreign import ccall "ibus_property_get_sensitive" ibus_property_get_sensitive ::
Ptr Property ->
IO CInt
propertyGetSensitive ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m Bool
propertyGetSensitive :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m Bool
propertyGetSensitive a
prop = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
CInt
result <- Ptr Property -> IO CInt
ibus_property_get_sensitive Ptr Property
prop'
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
prop
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetSensitiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetSensitiveMethodInfo a signature where
overloadedMethod = propertyGetSensitive
instance O.OverloadedMethodInfo PropertyGetSensitiveMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetSensitive",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetSensitive"
}
#endif
foreign import ccall "ibus_property_get_state" ibus_property_get_state ::
Ptr Property ->
IO CUInt
propertyGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m IBus.Enums.PropState
propertyGetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m PropState
propertyGetState a
prop = IO PropState -> m PropState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PropState -> m PropState) -> IO PropState -> m PropState
forall a b. (a -> b) -> a -> b
$ do
Ptr Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
CUInt
result <- Ptr Property -> IO CUInt
ibus_property_get_state Ptr Property
prop'
let result' :: PropState
result' = (Int -> PropState
forall a. Enum a => Int -> a
toEnum (Int -> PropState) -> (CUInt -> Int) -> CUInt -> PropState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
PropState -> IO PropState
forall (m :: * -> *) a. Monad m => a -> m a
return PropState
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetStateMethodInfo
instance (signature ~ (m IBus.Enums.PropState), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetStateMethodInfo a signature where
overloadedMethod = propertyGetState
instance O.OverloadedMethodInfo PropertyGetStateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetState",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetState"
}
#endif
foreign import ccall "ibus_property_get_sub_props" ibus_property_get_sub_props ::
Ptr Property ->
IO (Ptr IBus.PropList.PropList)
propertyGetSubProps ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m IBus.PropList.PropList
propertyGetSubProps :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m PropList
propertyGetSubProps a
prop = IO PropList -> m PropList
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PropList -> m PropList) -> IO PropList -> m PropList
forall a b. (a -> b) -> a -> b
$ do
Ptr Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
Ptr PropList
result <- Ptr Property -> IO (Ptr PropList)
ibus_property_get_sub_props Ptr Property
prop'
Text -> Ptr PropList -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"propertyGetSubProps" Ptr PropList
result
PropList
result' <- ((ManagedPtr PropList -> PropList) -> Ptr PropList -> IO PropList
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PropList -> PropList
IBus.PropList.PropList) Ptr PropList
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
PropList -> IO PropList
forall (m :: * -> *) a. Monad m => a -> m a
return PropList
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetSubPropsMethodInfo
instance (signature ~ (m IBus.PropList.PropList), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetSubPropsMethodInfo a signature where
overloadedMethod = propertyGetSubProps
instance O.OverloadedMethodInfo PropertyGetSubPropsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetSubProps",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetSubProps"
}
#endif
foreign import ccall "ibus_property_get_symbol" ibus_property_get_symbol ::
Ptr Property ->
IO (Ptr IBus.Text.Text)
propertyGetSymbol ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m IBus.Text.Text
propertyGetSymbol :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m Text
propertyGetSymbol a
prop = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
Ptr Text
result <- Ptr Property -> IO (Ptr Text)
ibus_property_get_symbol Ptr Property
prop'
Text -> Ptr Text -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"propertyGetSymbol" 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
prop
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetSymbolMethodInfo
instance (signature ~ (m IBus.Text.Text), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetSymbolMethodInfo a signature where
overloadedMethod = propertyGetSymbol
instance O.OverloadedMethodInfo PropertyGetSymbolMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetSymbol",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetSymbol"
}
#endif
foreign import ccall "ibus_property_get_tooltip" ibus_property_get_tooltip ::
Ptr Property ->
IO (Ptr IBus.Text.Text)
propertyGetTooltip ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m IBus.Text.Text
propertyGetTooltip :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m Text
propertyGetTooltip a
prop = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
Ptr Text
result <- Ptr Property -> IO (Ptr Text)
ibus_property_get_tooltip Ptr Property
prop'
Text -> Ptr Text -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"propertyGetTooltip" 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
prop
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetTooltipMethodInfo
instance (signature ~ (m IBus.Text.Text), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetTooltipMethodInfo a signature where
overloadedMethod = propertyGetTooltip
instance O.OverloadedMethodInfo PropertyGetTooltipMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetTooltip",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetTooltip"
}
#endif
foreign import ccall "ibus_property_get_visible" ibus_property_get_visible ::
Ptr Property ->
IO CInt
propertyGetVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> m Bool
propertyGetVisible :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> m Bool
propertyGetVisible a
prop = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
CInt
result <- Ptr Property -> IO CInt
ibus_property_get_visible Ptr Property
prop'
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
prop
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PropertyGetVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsProperty a) => O.OverloadedMethod PropertyGetVisibleMethodInfo a signature where
overloadedMethod = propertyGetVisible
instance O.OverloadedMethodInfo PropertyGetVisibleMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyGetVisible",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyGetVisible"
}
#endif
foreign import ccall "ibus_property_set_icon" ibus_property_set_icon ::
Ptr Property ->
CString ->
IO ()
propertySetIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> T.Text
-> m ()
propertySetIcon :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> Text -> m ()
propertySetIcon a
prop Text
icon = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
CString
icon' <- Text -> IO CString
textToCString Text
icon
Ptr Property -> CString -> IO ()
ibus_property_set_icon Ptr Property
prop' CString
icon'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
icon'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PropertySetIconMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsProperty a) => O.OverloadedMethod PropertySetIconMethodInfo a signature where
overloadedMethod = propertySetIcon
instance O.OverloadedMethodInfo PropertySetIconMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertySetIcon",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertySetIcon"
}
#endif
foreign import ccall "ibus_property_set_label" ibus_property_set_label ::
Ptr Property ->
Ptr IBus.Text.Text ->
IO ()
propertySetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a, IBus.Text.IsText b) =>
a
-> b
-> m ()
propertySetLabel :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsProperty a, IsText b) =>
a -> b -> m ()
propertySetLabel a
prop b
label = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
Ptr Text
label' <- b -> IO (Ptr Text)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
label
Ptr Property -> Ptr Text -> IO ()
ibus_property_set_label Ptr Property
prop' Ptr Text
label'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
label
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PropertySetLabelMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsProperty a, IBus.Text.IsText b) => O.OverloadedMethod PropertySetLabelMethodInfo a signature where
overloadedMethod = propertySetLabel
instance O.OverloadedMethodInfo PropertySetLabelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertySetLabel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertySetLabel"
}
#endif
foreign import ccall "ibus_property_set_sensitive" ibus_property_set_sensitive ::
Ptr Property ->
CInt ->
IO ()
propertySetSensitive ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> Bool
-> m ()
propertySetSensitive :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> Bool -> m ()
propertySetSensitive a
prop Bool
sensitive = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
let sensitive' :: CInt
sensitive' = (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
sensitive
Ptr Property -> CInt -> IO ()
ibus_property_set_sensitive Ptr Property
prop' CInt
sensitive'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PropertySetSensitiveMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsProperty a) => O.OverloadedMethod PropertySetSensitiveMethodInfo a signature where
overloadedMethod = propertySetSensitive
instance O.OverloadedMethodInfo PropertySetSensitiveMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertySetSensitive",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertySetSensitive"
}
#endif
foreign import ccall "ibus_property_set_state" ibus_property_set_state ::
Ptr Property ->
CUInt ->
IO ()
propertySetState ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> IBus.Enums.PropState
-> m ()
propertySetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> PropState -> m ()
propertySetState a
prop PropState
state = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
let state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PropState -> Int) -> PropState -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PropState -> Int
forall a. Enum a => a -> Int
fromEnum) PropState
state
Ptr Property -> CUInt -> IO ()
ibus_property_set_state Ptr Property
prop' CUInt
state'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PropertySetStateMethodInfo
instance (signature ~ (IBus.Enums.PropState -> m ()), MonadIO m, IsProperty a) => O.OverloadedMethod PropertySetStateMethodInfo a signature where
overloadedMethod = propertySetState
instance O.OverloadedMethodInfo PropertySetStateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertySetState",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertySetState"
}
#endif
foreign import ccall "ibus_property_set_sub_props" ibus_property_set_sub_props ::
Ptr Property ->
Ptr IBus.PropList.PropList ->
IO ()
propertySetSubProps ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a, IBus.PropList.IsPropList b) =>
a
-> b
-> m ()
propertySetSubProps :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsProperty a, IsPropList b) =>
a -> b -> m ()
propertySetSubProps a
prop b
propList = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
Ptr PropList
propList' <- b -> IO (Ptr PropList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
propList
Ptr Property -> Ptr PropList -> IO ()
ibus_property_set_sub_props Ptr Property
prop' Ptr PropList
propList'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
propList
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PropertySetSubPropsMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsProperty a, IBus.PropList.IsPropList b) => O.OverloadedMethod PropertySetSubPropsMethodInfo a signature where
overloadedMethod = propertySetSubProps
instance O.OverloadedMethodInfo PropertySetSubPropsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertySetSubProps",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertySetSubProps"
}
#endif
foreign import ccall "ibus_property_set_symbol" ibus_property_set_symbol ::
Ptr Property ->
Ptr IBus.Text.Text ->
IO ()
propertySetSymbol ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a, IBus.Text.IsText b) =>
a
-> b
-> m ()
propertySetSymbol :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsProperty a, IsText b) =>
a -> b -> m ()
propertySetSymbol a
prop b
symbol = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
Ptr Text
symbol' <- b -> IO (Ptr Text)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
symbol
Ptr Property -> Ptr Text -> IO ()
ibus_property_set_symbol Ptr Property
prop' Ptr Text
symbol'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
symbol
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PropertySetSymbolMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsProperty a, IBus.Text.IsText b) => O.OverloadedMethod PropertySetSymbolMethodInfo a signature where
overloadedMethod = propertySetSymbol
instance O.OverloadedMethodInfo PropertySetSymbolMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertySetSymbol",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertySetSymbol"
}
#endif
foreign import ccall "ibus_property_set_tooltip" ibus_property_set_tooltip ::
Ptr Property ->
Ptr IBus.Text.Text ->
IO ()
propertySetTooltip ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a, IBus.Text.IsText b) =>
a
-> b
-> m ()
propertySetTooltip :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsProperty a, IsText b) =>
a -> b -> m ()
propertySetTooltip a
prop b
tooltip = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
Ptr Text
tooltip' <- b -> IO (Ptr Text)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
tooltip
Ptr Property -> Ptr Text -> IO ()
ibus_property_set_tooltip Ptr Property
prop' Ptr Text
tooltip'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
tooltip
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PropertySetTooltipMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsProperty a, IBus.Text.IsText b) => O.OverloadedMethod PropertySetTooltipMethodInfo a signature where
overloadedMethod = propertySetTooltip
instance O.OverloadedMethodInfo PropertySetTooltipMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertySetTooltip",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertySetTooltip"
}
#endif
foreign import ccall "ibus_property_set_visible" ibus_property_set_visible ::
Ptr Property ->
CInt ->
IO ()
propertySetVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a) =>
a
-> Bool
-> m ()
propertySetVisible :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsProperty a) =>
a -> Bool -> m ()
propertySetVisible a
prop 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
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 Property -> CInt -> IO ()
ibus_property_set_visible Ptr Property
prop' CInt
visible'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
prop
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PropertySetVisibleMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsProperty a) => O.OverloadedMethod PropertySetVisibleMethodInfo a signature where
overloadedMethod = propertySetVisible
instance O.OverloadedMethodInfo PropertySetVisibleMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertySetVisible",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertySetVisible"
}
#endif
foreign import ccall "ibus_property_update" ibus_property_update ::
Ptr Property ->
Ptr Property ->
IO CInt
propertyUpdate ::
(B.CallStack.HasCallStack, MonadIO m, IsProperty a, IsProperty b) =>
a
-> b
-> m Bool
propertyUpdate :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsProperty a, IsProperty b) =>
a -> b -> m Bool
propertyUpdate a
prop b
propUpdate = 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 Property
prop' <- a -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
prop
Ptr Property
propUpdate' <- b -> IO (Ptr Property)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
propUpdate
CInt
result <- Ptr Property -> Ptr Property -> IO CInt
ibus_property_update Ptr Property
prop' Ptr Property
propUpdate'
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
prop
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
propUpdate
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PropertyUpdateMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsProperty a, IsProperty b) => O.OverloadedMethod PropertyUpdateMethodInfo a signature where
overloadedMethod = propertyUpdate
instance O.OverloadedMethodInfo PropertyUpdateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.IBus.Objects.Property.propertyUpdate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ibus-1.5.3/docs/GI-IBus-Objects-Property.html#v:propertyUpdate"
}
#endif