{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Atk.Objects.Hyperlink
(
Hyperlink(..) ,
IsHyperlink ,
toHyperlink ,
noHyperlink ,
#if defined(ENABLE_OVERLOADING)
ResolveHyperlinkMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
HyperlinkGetEndIndexMethodInfo ,
#endif
hyperlinkGetEndIndex ,
#if defined(ENABLE_OVERLOADING)
HyperlinkGetNAnchorsMethodInfo ,
#endif
hyperlinkGetNAnchors ,
#if defined(ENABLE_OVERLOADING)
HyperlinkGetObjectMethodInfo ,
#endif
hyperlinkGetObject ,
#if defined(ENABLE_OVERLOADING)
HyperlinkGetStartIndexMethodInfo ,
#endif
hyperlinkGetStartIndex ,
#if defined(ENABLE_OVERLOADING)
HyperlinkGetUriMethodInfo ,
#endif
hyperlinkGetUri ,
#if defined(ENABLE_OVERLOADING)
HyperlinkIsInlineMethodInfo ,
#endif
hyperlinkIsInline ,
#if defined(ENABLE_OVERLOADING)
HyperlinkIsSelectedLinkMethodInfo ,
#endif
hyperlinkIsSelectedLink ,
#if defined(ENABLE_OVERLOADING)
HyperlinkIsValidMethodInfo ,
#endif
hyperlinkIsValid ,
#if defined(ENABLE_OVERLOADING)
HyperlinkEndIndexPropertyInfo ,
#endif
getHyperlinkEndIndex ,
#if defined(ENABLE_OVERLOADING)
hyperlinkEndIndex ,
#endif
#if defined(ENABLE_OVERLOADING)
HyperlinkNumberOfAnchorsPropertyInfo ,
#endif
getHyperlinkNumberOfAnchors ,
#if defined(ENABLE_OVERLOADING)
hyperlinkNumberOfAnchors ,
#endif
#if defined(ENABLE_OVERLOADING)
HyperlinkSelectedLinkPropertyInfo ,
#endif
getHyperlinkSelectedLink ,
#if defined(ENABLE_OVERLOADING)
hyperlinkSelectedLink ,
#endif
#if defined(ENABLE_OVERLOADING)
HyperlinkStartIndexPropertyInfo ,
#endif
getHyperlinkStartIndex ,
#if defined(ENABLE_OVERLOADING)
hyperlinkStartIndex ,
#endif
C_HyperlinkLinkActivatedCallback ,
HyperlinkLinkActivatedCallback ,
#if defined(ENABLE_OVERLOADING)
HyperlinkLinkActivatedSignalInfo ,
#endif
afterHyperlinkLinkActivated ,
genClosure_HyperlinkLinkActivated ,
mk_HyperlinkLinkActivatedCallback ,
noHyperlinkLinkActivatedCallback ,
onHyperlinkLinkActivated ,
wrap_HyperlinkLinkActivatedCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import {-# SOURCE #-} qualified GI.Atk.Interfaces.Action as Atk.Action
import {-# SOURCE #-} qualified GI.Atk.Objects.Object as Atk.Object
import qualified GI.GObject.Objects.Object as GObject.Object
newtype Hyperlink = Hyperlink (ManagedPtr Hyperlink)
deriving (Hyperlink -> Hyperlink -> Bool
(Hyperlink -> Hyperlink -> Bool)
-> (Hyperlink -> Hyperlink -> Bool) -> Eq Hyperlink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Hyperlink -> Hyperlink -> Bool
$c/= :: Hyperlink -> Hyperlink -> Bool
== :: Hyperlink -> Hyperlink -> Bool
$c== :: Hyperlink -> Hyperlink -> Bool
Eq)
foreign import ccall "atk_hyperlink_get_type"
c_atk_hyperlink_get_type :: IO GType
instance GObject Hyperlink where
gobjectType :: IO GType
gobjectType = IO GType
c_atk_hyperlink_get_type
instance B.GValue.IsGValue Hyperlink where
toGValue :: Hyperlink -> IO GValue
toGValue o :: Hyperlink
o = do
GType
gtype <- IO GType
c_atk_hyperlink_get_type
Hyperlink -> (Ptr Hyperlink -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Hyperlink
o (GType
-> (GValue -> Ptr Hyperlink -> IO ()) -> Ptr Hyperlink -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Hyperlink -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Hyperlink
fromGValue gv :: GValue
gv = do
Ptr Hyperlink
ptr <- GValue -> IO (Ptr Hyperlink)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Hyperlink)
(ManagedPtr Hyperlink -> Hyperlink)
-> Ptr Hyperlink -> IO Hyperlink
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Hyperlink -> Hyperlink
Hyperlink Ptr Hyperlink
ptr
class (GObject o, O.IsDescendantOf Hyperlink o) => IsHyperlink o
instance (GObject o, O.IsDescendantOf Hyperlink o) => IsHyperlink o
instance O.HasParentTypes Hyperlink
type instance O.ParentTypes Hyperlink = '[GObject.Object.Object, Atk.Action.Action]
toHyperlink :: (MonadIO m, IsHyperlink o) => o -> m Hyperlink
toHyperlink :: o -> m Hyperlink
toHyperlink = IO Hyperlink -> m Hyperlink
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Hyperlink -> m Hyperlink)
-> (o -> IO Hyperlink) -> o -> m Hyperlink
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Hyperlink -> Hyperlink) -> o -> IO Hyperlink
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Hyperlink -> Hyperlink
Hyperlink
noHyperlink :: Maybe Hyperlink
noHyperlink :: Maybe Hyperlink
noHyperlink = Maybe Hyperlink
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveHyperlinkMethod (t :: Symbol) (o :: *) :: * where
ResolveHyperlinkMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveHyperlinkMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveHyperlinkMethod "doAction" o = Atk.Action.ActionDoActionMethodInfo
ResolveHyperlinkMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveHyperlinkMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveHyperlinkMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveHyperlinkMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveHyperlinkMethod "isInline" o = HyperlinkIsInlineMethodInfo
ResolveHyperlinkMethod "isSelectedLink" o = HyperlinkIsSelectedLinkMethodInfo
ResolveHyperlinkMethod "isValid" o = HyperlinkIsValidMethodInfo
ResolveHyperlinkMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveHyperlinkMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveHyperlinkMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveHyperlinkMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveHyperlinkMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveHyperlinkMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveHyperlinkMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveHyperlinkMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveHyperlinkMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveHyperlinkMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveHyperlinkMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveHyperlinkMethod "getDescription" o = Atk.Action.ActionGetDescriptionMethodInfo
ResolveHyperlinkMethod "getEndIndex" o = HyperlinkGetEndIndexMethodInfo
ResolveHyperlinkMethod "getKeybinding" o = Atk.Action.ActionGetKeybindingMethodInfo
ResolveHyperlinkMethod "getLocalizedName" o = Atk.Action.ActionGetLocalizedNameMethodInfo
ResolveHyperlinkMethod "getNActions" o = Atk.Action.ActionGetNActionsMethodInfo
ResolveHyperlinkMethod "getNAnchors" o = HyperlinkGetNAnchorsMethodInfo
ResolveHyperlinkMethod "getName" o = Atk.Action.ActionGetNameMethodInfo
ResolveHyperlinkMethod "getObject" o = HyperlinkGetObjectMethodInfo
ResolveHyperlinkMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveHyperlinkMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveHyperlinkMethod "getStartIndex" o = HyperlinkGetStartIndexMethodInfo
ResolveHyperlinkMethod "getUri" o = HyperlinkGetUriMethodInfo
ResolveHyperlinkMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveHyperlinkMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveHyperlinkMethod "setDescription" o = Atk.Action.ActionSetDescriptionMethodInfo
ResolveHyperlinkMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveHyperlinkMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveHyperlinkMethod t Hyperlink, O.MethodInfo info Hyperlink p) => OL.IsLabel t (Hyperlink -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type HyperlinkLinkActivatedCallback =
IO ()
noHyperlinkLinkActivatedCallback :: Maybe HyperlinkLinkActivatedCallback
noHyperlinkLinkActivatedCallback :: Maybe (IO ())
noHyperlinkLinkActivatedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_HyperlinkLinkActivatedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_HyperlinkLinkActivatedCallback :: C_HyperlinkLinkActivatedCallback -> IO (FunPtr C_HyperlinkLinkActivatedCallback)
genClosure_HyperlinkLinkActivated :: MonadIO m => HyperlinkLinkActivatedCallback -> m (GClosure C_HyperlinkLinkActivatedCallback)
genClosure_HyperlinkLinkActivated :: IO () -> m (GClosure C_HyperlinkLinkActivatedCallback)
genClosure_HyperlinkLinkActivated cb :: IO ()
cb = IO (GClosure C_HyperlinkLinkActivatedCallback)
-> m (GClosure C_HyperlinkLinkActivatedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_HyperlinkLinkActivatedCallback)
-> m (GClosure C_HyperlinkLinkActivatedCallback))
-> IO (GClosure C_HyperlinkLinkActivatedCallback)
-> m (GClosure C_HyperlinkLinkActivatedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HyperlinkLinkActivatedCallback
cb' = IO () -> C_HyperlinkLinkActivatedCallback
wrap_HyperlinkLinkActivatedCallback IO ()
cb
C_HyperlinkLinkActivatedCallback
-> IO (FunPtr C_HyperlinkLinkActivatedCallback)
mk_HyperlinkLinkActivatedCallback C_HyperlinkLinkActivatedCallback
cb' IO (FunPtr C_HyperlinkLinkActivatedCallback)
-> (FunPtr C_HyperlinkLinkActivatedCallback
-> IO (GClosure C_HyperlinkLinkActivatedCallback))
-> IO (GClosure C_HyperlinkLinkActivatedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_HyperlinkLinkActivatedCallback
-> IO (GClosure C_HyperlinkLinkActivatedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HyperlinkLinkActivatedCallback ::
HyperlinkLinkActivatedCallback ->
C_HyperlinkLinkActivatedCallback
wrap_HyperlinkLinkActivatedCallback :: IO () -> C_HyperlinkLinkActivatedCallback
wrap_HyperlinkLinkActivatedCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onHyperlinkLinkActivated :: (IsHyperlink a, MonadIO m) => a -> HyperlinkLinkActivatedCallback -> m SignalHandlerId
onHyperlinkLinkActivated :: a -> IO () -> m SignalHandlerId
onHyperlinkLinkActivated obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HyperlinkLinkActivatedCallback
cb' = IO () -> C_HyperlinkLinkActivatedCallback
wrap_HyperlinkLinkActivatedCallback IO ()
cb
FunPtr C_HyperlinkLinkActivatedCallback
cb'' <- C_HyperlinkLinkActivatedCallback
-> IO (FunPtr C_HyperlinkLinkActivatedCallback)
mk_HyperlinkLinkActivatedCallback C_HyperlinkLinkActivatedCallback
cb'
a
-> Text
-> FunPtr C_HyperlinkLinkActivatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "link-activated" FunPtr C_HyperlinkLinkActivatedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterHyperlinkLinkActivated :: (IsHyperlink a, MonadIO m) => a -> HyperlinkLinkActivatedCallback -> m SignalHandlerId
afterHyperlinkLinkActivated :: a -> IO () -> m SignalHandlerId
afterHyperlinkLinkActivated obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HyperlinkLinkActivatedCallback
cb' = IO () -> C_HyperlinkLinkActivatedCallback
wrap_HyperlinkLinkActivatedCallback IO ()
cb
FunPtr C_HyperlinkLinkActivatedCallback
cb'' <- C_HyperlinkLinkActivatedCallback
-> IO (FunPtr C_HyperlinkLinkActivatedCallback)
mk_HyperlinkLinkActivatedCallback C_HyperlinkLinkActivatedCallback
cb'
a
-> Text
-> FunPtr C_HyperlinkLinkActivatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "link-activated" FunPtr C_HyperlinkLinkActivatedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data HyperlinkLinkActivatedSignalInfo
instance SignalInfo HyperlinkLinkActivatedSignalInfo where
type HaskellCallbackType HyperlinkLinkActivatedSignalInfo = HyperlinkLinkActivatedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_HyperlinkLinkActivatedCallback cb
cb'' <- mk_HyperlinkLinkActivatedCallback cb'
connectSignalFunPtr obj "link-activated" cb'' connectMode detail
#endif
getHyperlinkEndIndex :: (MonadIO m, IsHyperlink o) => o -> m Int32
getHyperlinkEndIndex :: o -> m Int32
getHyperlinkEndIndex obj :: o
obj = 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
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "end-index"
#if defined(ENABLE_OVERLOADING)
data HyperlinkEndIndexPropertyInfo
instance AttrInfo HyperlinkEndIndexPropertyInfo where
type AttrAllowedOps HyperlinkEndIndexPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint HyperlinkEndIndexPropertyInfo = IsHyperlink
type AttrSetTypeConstraint HyperlinkEndIndexPropertyInfo = (~) ()
type AttrTransferTypeConstraint HyperlinkEndIndexPropertyInfo = (~) ()
type AttrTransferType HyperlinkEndIndexPropertyInfo = ()
type AttrGetType HyperlinkEndIndexPropertyInfo = Int32
type AttrLabel HyperlinkEndIndexPropertyInfo = "end-index"
type AttrOrigin HyperlinkEndIndexPropertyInfo = Hyperlink
attrGet = getHyperlinkEndIndex
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getHyperlinkNumberOfAnchors :: (MonadIO m, IsHyperlink o) => o -> m Int32
getHyperlinkNumberOfAnchors :: o -> m Int32
getHyperlinkNumberOfAnchors obj :: o
obj = 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
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "number-of-anchors"
#if defined(ENABLE_OVERLOADING)
data HyperlinkNumberOfAnchorsPropertyInfo
instance AttrInfo HyperlinkNumberOfAnchorsPropertyInfo where
type AttrAllowedOps HyperlinkNumberOfAnchorsPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint HyperlinkNumberOfAnchorsPropertyInfo = IsHyperlink
type AttrSetTypeConstraint HyperlinkNumberOfAnchorsPropertyInfo = (~) ()
type AttrTransferTypeConstraint HyperlinkNumberOfAnchorsPropertyInfo = (~) ()
type AttrTransferType HyperlinkNumberOfAnchorsPropertyInfo = ()
type AttrGetType HyperlinkNumberOfAnchorsPropertyInfo = Int32
type AttrLabel HyperlinkNumberOfAnchorsPropertyInfo = "number-of-anchors"
type AttrOrigin HyperlinkNumberOfAnchorsPropertyInfo = Hyperlink
attrGet = getHyperlinkNumberOfAnchors
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getHyperlinkSelectedLink :: (MonadIO m, IsHyperlink o) => o -> m Bool
getHyperlinkSelectedLink :: o -> m Bool
getHyperlinkSelectedLink obj :: o
obj = 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
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "selected-link"
#if defined(ENABLE_OVERLOADING)
data HyperlinkSelectedLinkPropertyInfo
instance AttrInfo HyperlinkSelectedLinkPropertyInfo where
type AttrAllowedOps HyperlinkSelectedLinkPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint HyperlinkSelectedLinkPropertyInfo = IsHyperlink
type AttrSetTypeConstraint HyperlinkSelectedLinkPropertyInfo = (~) ()
type AttrTransferTypeConstraint HyperlinkSelectedLinkPropertyInfo = (~) ()
type AttrTransferType HyperlinkSelectedLinkPropertyInfo = ()
type AttrGetType HyperlinkSelectedLinkPropertyInfo = Bool
type AttrLabel HyperlinkSelectedLinkPropertyInfo = "selected-link"
type AttrOrigin HyperlinkSelectedLinkPropertyInfo = Hyperlink
attrGet = getHyperlinkSelectedLink
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getHyperlinkStartIndex :: (MonadIO m, IsHyperlink o) => o -> m Int32
getHyperlinkStartIndex :: o -> m Int32
getHyperlinkStartIndex obj :: o
obj = 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
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "start-index"
#if defined(ENABLE_OVERLOADING)
data HyperlinkStartIndexPropertyInfo
instance AttrInfo HyperlinkStartIndexPropertyInfo where
type AttrAllowedOps HyperlinkStartIndexPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint HyperlinkStartIndexPropertyInfo = IsHyperlink
type AttrSetTypeConstraint HyperlinkStartIndexPropertyInfo = (~) ()
type AttrTransferTypeConstraint HyperlinkStartIndexPropertyInfo = (~) ()
type AttrTransferType HyperlinkStartIndexPropertyInfo = ()
type AttrGetType HyperlinkStartIndexPropertyInfo = Int32
type AttrLabel HyperlinkStartIndexPropertyInfo = "start-index"
type AttrOrigin HyperlinkStartIndexPropertyInfo = Hyperlink
attrGet = getHyperlinkStartIndex
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Hyperlink
type instance O.AttributeList Hyperlink = HyperlinkAttributeList
type HyperlinkAttributeList = ('[ '("endIndex", HyperlinkEndIndexPropertyInfo), '("numberOfAnchors", HyperlinkNumberOfAnchorsPropertyInfo), '("selectedLink", HyperlinkSelectedLinkPropertyInfo), '("startIndex", HyperlinkStartIndexPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
hyperlinkEndIndex :: AttrLabelProxy "endIndex"
hyperlinkEndIndex = AttrLabelProxy
hyperlinkNumberOfAnchors :: AttrLabelProxy "numberOfAnchors"
hyperlinkNumberOfAnchors = AttrLabelProxy
hyperlinkSelectedLink :: AttrLabelProxy "selectedLink"
hyperlinkSelectedLink = AttrLabelProxy
hyperlinkStartIndex :: AttrLabelProxy "startIndex"
hyperlinkStartIndex = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Hyperlink = HyperlinkSignalList
type HyperlinkSignalList = ('[ '("linkActivated", HyperlinkLinkActivatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "atk_hyperlink_get_end_index" atk_hyperlink_get_end_index ::
Ptr Hyperlink ->
IO Int32
hyperlinkGetEndIndex ::
(B.CallStack.HasCallStack, MonadIO m, IsHyperlink a) =>
a
-> m Int32
hyperlinkGetEndIndex :: a -> m Int32
hyperlinkGetEndIndex link_ :: a
link_ = 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 Hyperlink
link_' <- a -> IO (Ptr Hyperlink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
link_
Int32
result <- Ptr Hyperlink -> IO Int32
atk_hyperlink_get_end_index Ptr Hyperlink
link_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
link_
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data HyperlinkGetEndIndexMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsHyperlink a) => O.MethodInfo HyperlinkGetEndIndexMethodInfo a signature where
overloadedMethod = hyperlinkGetEndIndex
#endif
foreign import ccall "atk_hyperlink_get_n_anchors" atk_hyperlink_get_n_anchors ::
Ptr Hyperlink ->
IO Int32
hyperlinkGetNAnchors ::
(B.CallStack.HasCallStack, MonadIO m, IsHyperlink a) =>
a
-> m Int32
hyperlinkGetNAnchors :: a -> m Int32
hyperlinkGetNAnchors link_ :: a
link_ = 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 Hyperlink
link_' <- a -> IO (Ptr Hyperlink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
link_
Int32
result <- Ptr Hyperlink -> IO Int32
atk_hyperlink_get_n_anchors Ptr Hyperlink
link_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
link_
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data HyperlinkGetNAnchorsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsHyperlink a) => O.MethodInfo HyperlinkGetNAnchorsMethodInfo a signature where
overloadedMethod = hyperlinkGetNAnchors
#endif
foreign import ccall "atk_hyperlink_get_object" atk_hyperlink_get_object ::
Ptr Hyperlink ->
Int32 ->
IO (Ptr Atk.Object.Object)
hyperlinkGetObject ::
(B.CallStack.HasCallStack, MonadIO m, IsHyperlink a) =>
a
-> Int32
-> m Atk.Object.Object
hyperlinkGetObject :: a -> Int32 -> m Object
hyperlinkGetObject link_ :: a
link_ i :: Int32
i = IO Object -> m Object
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Object -> m Object) -> IO Object -> m Object
forall a b. (a -> b) -> a -> b
$ do
Ptr Hyperlink
link_' <- a -> IO (Ptr Hyperlink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
link_
Ptr Object
result <- Ptr Hyperlink -> Int32 -> IO (Ptr Object)
atk_hyperlink_get_object Ptr Hyperlink
link_' Int32
i
Text -> Ptr Object -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "hyperlinkGetObject" Ptr Object
result
Object
result' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Atk.Object.Object) Ptr Object
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
link_
Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result'
#if defined(ENABLE_OVERLOADING)
data HyperlinkGetObjectMethodInfo
instance (signature ~ (Int32 -> m Atk.Object.Object), MonadIO m, IsHyperlink a) => O.MethodInfo HyperlinkGetObjectMethodInfo a signature where
overloadedMethod = hyperlinkGetObject
#endif
foreign import ccall "atk_hyperlink_get_start_index" atk_hyperlink_get_start_index ::
Ptr Hyperlink ->
IO Int32
hyperlinkGetStartIndex ::
(B.CallStack.HasCallStack, MonadIO m, IsHyperlink a) =>
a
-> m Int32
hyperlinkGetStartIndex :: a -> m Int32
hyperlinkGetStartIndex link_ :: a
link_ = 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 Hyperlink
link_' <- a -> IO (Ptr Hyperlink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
link_
Int32
result <- Ptr Hyperlink -> IO Int32
atk_hyperlink_get_start_index Ptr Hyperlink
link_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
link_
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data HyperlinkGetStartIndexMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsHyperlink a) => O.MethodInfo HyperlinkGetStartIndexMethodInfo a signature where
overloadedMethod = hyperlinkGetStartIndex
#endif
foreign import ccall "atk_hyperlink_get_uri" atk_hyperlink_get_uri ::
Ptr Hyperlink ->
Int32 ->
IO CString
hyperlinkGetUri ::
(B.CallStack.HasCallStack, MonadIO m, IsHyperlink a) =>
a
-> Int32
-> m T.Text
hyperlinkGetUri :: a -> Int32 -> m Text
hyperlinkGetUri link_ :: a
link_ i :: Int32
i = 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 Hyperlink
link_' <- a -> IO (Ptr Hyperlink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
link_
CString
result <- Ptr Hyperlink -> Int32 -> IO CString
atk_hyperlink_get_uri Ptr Hyperlink
link_' Int32
i
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "hyperlinkGetUri" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
link_
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data HyperlinkGetUriMethodInfo
instance (signature ~ (Int32 -> m T.Text), MonadIO m, IsHyperlink a) => O.MethodInfo HyperlinkGetUriMethodInfo a signature where
overloadedMethod = hyperlinkGetUri
#endif
foreign import ccall "atk_hyperlink_is_inline" atk_hyperlink_is_inline ::
Ptr Hyperlink ->
IO CInt
hyperlinkIsInline ::
(B.CallStack.HasCallStack, MonadIO m, IsHyperlink a) =>
a
-> m Bool
hyperlinkIsInline :: a -> m Bool
hyperlinkIsInline link_ :: a
link_ = 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 Hyperlink
link_' <- a -> IO (Ptr Hyperlink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
link_
CInt
result <- Ptr Hyperlink -> IO CInt
atk_hyperlink_is_inline Ptr Hyperlink
link_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
link_
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data HyperlinkIsInlineMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHyperlink a) => O.MethodInfo HyperlinkIsInlineMethodInfo a signature where
overloadedMethod = hyperlinkIsInline
#endif
foreign import ccall "atk_hyperlink_is_selected_link" atk_hyperlink_is_selected_link ::
Ptr Hyperlink ->
IO CInt
{-# DEPRECATED hyperlinkIsSelectedLink ["(Since version 1.8)","Please use ATK_STATE_FOCUSABLE for all links,","and ATK_STATE_FOCUSED for focused links."] #-}
hyperlinkIsSelectedLink ::
(B.CallStack.HasCallStack, MonadIO m, IsHyperlink a) =>
a
-> m Bool
hyperlinkIsSelectedLink :: a -> m Bool
hyperlinkIsSelectedLink link_ :: a
link_ = 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 Hyperlink
link_' <- a -> IO (Ptr Hyperlink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
link_
CInt
result <- Ptr Hyperlink -> IO CInt
atk_hyperlink_is_selected_link Ptr Hyperlink
link_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
link_
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data HyperlinkIsSelectedLinkMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHyperlink a) => O.MethodInfo HyperlinkIsSelectedLinkMethodInfo a signature where
overloadedMethod = hyperlinkIsSelectedLink
#endif
foreign import ccall "atk_hyperlink_is_valid" atk_hyperlink_is_valid ::
Ptr Hyperlink ->
IO CInt
hyperlinkIsValid ::
(B.CallStack.HasCallStack, MonadIO m, IsHyperlink a) =>
a
-> m Bool
hyperlinkIsValid :: a -> m Bool
hyperlinkIsValid link_ :: a
link_ = 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 Hyperlink
link_' <- a -> IO (Ptr Hyperlink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
link_
CInt
result <- Ptr Hyperlink -> IO CInt
atk_hyperlink_is_valid Ptr Hyperlink
link_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
link_
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data HyperlinkIsValidMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHyperlink a) => O.MethodInfo HyperlinkIsValidMethodInfo a signature where
overloadedMethod = hyperlinkIsValid
#endif