{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.WebKit2WebExtension.Objects.DOMKeyboardEvent
(
DOMKeyboardEvent(..) ,
IsDOMKeyboardEvent ,
toDOMKeyboardEvent ,
#if defined(ENABLE_OVERLOADING)
ResolveDOMKeyboardEventMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventGetAltGraphKeyMethodInfo,
#endif
dOMKeyboardEventGetAltGraphKey ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventGetAltKeyMethodInfo ,
#endif
dOMKeyboardEventGetAltKey ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventGetCtrlKeyMethodInfo ,
#endif
dOMKeyboardEventGetCtrlKey ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventGetKeyIdentifierMethodInfo,
#endif
dOMKeyboardEventGetKeyIdentifier ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventGetKeyLocationMethodInfo,
#endif
dOMKeyboardEventGetKeyLocation ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventGetMetaKeyMethodInfo ,
#endif
dOMKeyboardEventGetMetaKey ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventGetModifierStateMethodInfo,
#endif
dOMKeyboardEventGetModifierState ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventGetShiftKeyMethodInfo ,
#endif
dOMKeyboardEventGetShiftKey ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventInitKeyboardEventMethodInfo,
#endif
dOMKeyboardEventInitKeyboardEvent ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventAltGraphKeyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dOMKeyboardEventAltGraphKey ,
#endif
getDOMKeyboardEventAltGraphKey ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventAltKeyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dOMKeyboardEventAltKey ,
#endif
getDOMKeyboardEventAltKey ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventCtrlKeyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dOMKeyboardEventCtrlKey ,
#endif
getDOMKeyboardEventCtrlKey ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventKeyIdentifierPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
dOMKeyboardEventKeyIdentifier ,
#endif
getDOMKeyboardEventKeyIdentifier ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventKeyLocationPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dOMKeyboardEventKeyLocation ,
#endif
getDOMKeyboardEventKeyLocation ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventMetaKeyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dOMKeyboardEventMetaKey ,
#endif
getDOMKeyboardEventMetaKey ,
#if defined(ENABLE_OVERLOADING)
DOMKeyboardEventShiftKeyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dOMKeyboardEventShiftKey ,
#endif
getDOMKeyboardEventShiftKey ,
) 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.GHashTable as B.GHT
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.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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.WebKit2WebExtension.Objects.DOMDOMWindow as WebKit2WebExtension.DOMDOMWindow
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMEvent as WebKit2WebExtension.DOMEvent
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMObject as WebKit2WebExtension.DOMObject
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMUIEvent as WebKit2WebExtension.DOMUIEvent
newtype DOMKeyboardEvent = DOMKeyboardEvent (SP.ManagedPtr DOMKeyboardEvent)
deriving (DOMKeyboardEvent -> DOMKeyboardEvent -> Bool
(DOMKeyboardEvent -> DOMKeyboardEvent -> Bool)
-> (DOMKeyboardEvent -> DOMKeyboardEvent -> Bool)
-> Eq DOMKeyboardEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DOMKeyboardEvent -> DOMKeyboardEvent -> Bool
== :: DOMKeyboardEvent -> DOMKeyboardEvent -> Bool
$c/= :: DOMKeyboardEvent -> DOMKeyboardEvent -> Bool
/= :: DOMKeyboardEvent -> DOMKeyboardEvent -> Bool
Eq)
instance SP.ManagedPtrNewtype DOMKeyboardEvent where
toManagedPtr :: DOMKeyboardEvent -> ManagedPtr DOMKeyboardEvent
toManagedPtr (DOMKeyboardEvent ManagedPtr DOMKeyboardEvent
p) = ManagedPtr DOMKeyboardEvent
p
foreign import ccall "webkit_dom_keyboard_event_get_type"
c_webkit_dom_keyboard_event_get_type :: IO B.Types.GType
instance B.Types.TypedObject DOMKeyboardEvent where
glibType :: IO GType
glibType = IO GType
c_webkit_dom_keyboard_event_get_type
instance B.Types.GObject DOMKeyboardEvent
class (SP.GObject o, O.IsDescendantOf DOMKeyboardEvent o) => IsDOMKeyboardEvent o
instance (SP.GObject o, O.IsDescendantOf DOMKeyboardEvent o) => IsDOMKeyboardEvent o
instance O.HasParentTypes DOMKeyboardEvent
type instance O.ParentTypes DOMKeyboardEvent = '[WebKit2WebExtension.DOMUIEvent.DOMUIEvent, WebKit2WebExtension.DOMEvent.DOMEvent, WebKit2WebExtension.DOMObject.DOMObject, GObject.Object.Object]
toDOMKeyboardEvent :: (MIO.MonadIO m, IsDOMKeyboardEvent o) => o -> m DOMKeyboardEvent
toDOMKeyboardEvent :: forall (m :: * -> *) o.
(MonadIO m, IsDOMKeyboardEvent o) =>
o -> m DOMKeyboardEvent
toDOMKeyboardEvent = IO DOMKeyboardEvent -> m DOMKeyboardEvent
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DOMKeyboardEvent -> m DOMKeyboardEvent)
-> (o -> IO DOMKeyboardEvent) -> o -> m DOMKeyboardEvent
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DOMKeyboardEvent -> DOMKeyboardEvent)
-> o -> IO DOMKeyboardEvent
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DOMKeyboardEvent -> DOMKeyboardEvent
DOMKeyboardEvent
instance B.GValue.IsGValue (Maybe DOMKeyboardEvent) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_webkit_dom_keyboard_event_get_type
gvalueSet_ :: Ptr GValue -> Maybe DOMKeyboardEvent -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DOMKeyboardEvent
P.Nothing = Ptr GValue -> Ptr DOMKeyboardEvent -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DOMKeyboardEvent
forall a. Ptr a
FP.nullPtr :: FP.Ptr DOMKeyboardEvent)
gvalueSet_ Ptr GValue
gv (P.Just DOMKeyboardEvent
obj) = DOMKeyboardEvent -> (Ptr DOMKeyboardEvent -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DOMKeyboardEvent
obj (Ptr GValue -> Ptr DOMKeyboardEvent -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DOMKeyboardEvent)
gvalueGet_ Ptr GValue
gv = do
Ptr DOMKeyboardEvent
ptr <- Ptr GValue -> IO (Ptr DOMKeyboardEvent)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DOMKeyboardEvent)
if Ptr DOMKeyboardEvent
ptr Ptr DOMKeyboardEvent -> Ptr DOMKeyboardEvent -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr DOMKeyboardEvent
forall a. Ptr a
FP.nullPtr
then DOMKeyboardEvent -> Maybe DOMKeyboardEvent
forall a. a -> Maybe a
P.Just (DOMKeyboardEvent -> Maybe DOMKeyboardEvent)
-> IO DOMKeyboardEvent -> IO (Maybe DOMKeyboardEvent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr DOMKeyboardEvent -> DOMKeyboardEvent)
-> Ptr DOMKeyboardEvent -> IO DOMKeyboardEvent
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DOMKeyboardEvent -> DOMKeyboardEvent
DOMKeyboardEvent Ptr DOMKeyboardEvent
ptr
else Maybe DOMKeyboardEvent -> IO (Maybe DOMKeyboardEvent)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DOMKeyboardEvent
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDOMKeyboardEventMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDOMKeyboardEventMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDOMKeyboardEventMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDOMKeyboardEventMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDOMKeyboardEventMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDOMKeyboardEventMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDOMKeyboardEventMethod "initEvent" o = WebKit2WebExtension.DOMEvent.DOMEventInitEventMethodInfo
ResolveDOMKeyboardEventMethod "initKeyboardEvent" o = DOMKeyboardEventInitKeyboardEventMethodInfo
ResolveDOMKeyboardEventMethod "initUiEvent" o = WebKit2WebExtension.DOMUIEvent.DOMUIEventInitUiEventMethodInfo
ResolveDOMKeyboardEventMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDOMKeyboardEventMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDOMKeyboardEventMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDOMKeyboardEventMethod "preventDefault" o = WebKit2WebExtension.DOMEvent.DOMEventPreventDefaultMethodInfo
ResolveDOMKeyboardEventMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDOMKeyboardEventMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDOMKeyboardEventMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDOMKeyboardEventMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDOMKeyboardEventMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDOMKeyboardEventMethod "stopPropagation" o = WebKit2WebExtension.DOMEvent.DOMEventStopPropagationMethodInfo
ResolveDOMKeyboardEventMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDOMKeyboardEventMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDOMKeyboardEventMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDOMKeyboardEventMethod "getAltGraphKey" o = DOMKeyboardEventGetAltGraphKeyMethodInfo
ResolveDOMKeyboardEventMethod "getAltKey" o = DOMKeyboardEventGetAltKeyMethodInfo
ResolveDOMKeyboardEventMethod "getBubbles" o = WebKit2WebExtension.DOMEvent.DOMEventGetBubblesMethodInfo
ResolveDOMKeyboardEventMethod "getCancelBubble" o = WebKit2WebExtension.DOMEvent.DOMEventGetCancelBubbleMethodInfo
ResolveDOMKeyboardEventMethod "getCancelable" o = WebKit2WebExtension.DOMEvent.DOMEventGetCancelableMethodInfo
ResolveDOMKeyboardEventMethod "getCharCode" o = WebKit2WebExtension.DOMUIEvent.DOMUIEventGetCharCodeMethodInfo
ResolveDOMKeyboardEventMethod "getCtrlKey" o = DOMKeyboardEventGetCtrlKeyMethodInfo
ResolveDOMKeyboardEventMethod "getCurrentTarget" o = WebKit2WebExtension.DOMEvent.DOMEventGetCurrentTargetMethodInfo
ResolveDOMKeyboardEventMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDOMKeyboardEventMethod "getDetail" o = WebKit2WebExtension.DOMUIEvent.DOMUIEventGetDetailMethodInfo
ResolveDOMKeyboardEventMethod "getEventPhase" o = WebKit2WebExtension.DOMEvent.DOMEventGetEventPhaseMethodInfo
ResolveDOMKeyboardEventMethod "getEventType" o = WebKit2WebExtension.DOMEvent.DOMEventGetEventTypeMethodInfo
ResolveDOMKeyboardEventMethod "getKeyCode" o = WebKit2WebExtension.DOMUIEvent.DOMUIEventGetKeyCodeMethodInfo
ResolveDOMKeyboardEventMethod "getKeyIdentifier" o = DOMKeyboardEventGetKeyIdentifierMethodInfo
ResolveDOMKeyboardEventMethod "getKeyLocation" o = DOMKeyboardEventGetKeyLocationMethodInfo
ResolveDOMKeyboardEventMethod "getLayerX" o = WebKit2WebExtension.DOMUIEvent.DOMUIEventGetLayerXMethodInfo
ResolveDOMKeyboardEventMethod "getLayerY" o = WebKit2WebExtension.DOMUIEvent.DOMUIEventGetLayerYMethodInfo
ResolveDOMKeyboardEventMethod "getMetaKey" o = DOMKeyboardEventGetMetaKeyMethodInfo
ResolveDOMKeyboardEventMethod "getModifierState" o = DOMKeyboardEventGetModifierStateMethodInfo
ResolveDOMKeyboardEventMethod "getPageX" o = WebKit2WebExtension.DOMUIEvent.DOMUIEventGetPageXMethodInfo
ResolveDOMKeyboardEventMethod "getPageY" o = WebKit2WebExtension.DOMUIEvent.DOMUIEventGetPageYMethodInfo
ResolveDOMKeyboardEventMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDOMKeyboardEventMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDOMKeyboardEventMethod "getReturnValue" o = WebKit2WebExtension.DOMEvent.DOMEventGetReturnValueMethodInfo
ResolveDOMKeyboardEventMethod "getShiftKey" o = DOMKeyboardEventGetShiftKeyMethodInfo
ResolveDOMKeyboardEventMethod "getSrcElement" o = WebKit2WebExtension.DOMEvent.DOMEventGetSrcElementMethodInfo
ResolveDOMKeyboardEventMethod "getTarget" o = WebKit2WebExtension.DOMEvent.DOMEventGetTargetMethodInfo
ResolveDOMKeyboardEventMethod "getTimeStamp" o = WebKit2WebExtension.DOMEvent.DOMEventGetTimeStampMethodInfo
ResolveDOMKeyboardEventMethod "getView" o = WebKit2WebExtension.DOMUIEvent.DOMUIEventGetViewMethodInfo
ResolveDOMKeyboardEventMethod "setCancelBubble" o = WebKit2WebExtension.DOMEvent.DOMEventSetCancelBubbleMethodInfo
ResolveDOMKeyboardEventMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDOMKeyboardEventMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDOMKeyboardEventMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDOMKeyboardEventMethod "setReturnValue" o = WebKit2WebExtension.DOMEvent.DOMEventSetReturnValueMethodInfo
ResolveDOMKeyboardEventMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDOMKeyboardEventMethod t DOMKeyboardEvent, O.OverloadedMethod info DOMKeyboardEvent p) => OL.IsLabel t (DOMKeyboardEvent -> 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 ~ ResolveDOMKeyboardEventMethod t DOMKeyboardEvent, O.OverloadedMethod info DOMKeyboardEvent p, R.HasField t DOMKeyboardEvent p) => R.HasField t DOMKeyboardEvent p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDOMKeyboardEventMethod t DOMKeyboardEvent, O.OverloadedMethodInfo info DOMKeyboardEvent) => OL.IsLabel t (O.MethodProxy info DOMKeyboardEvent) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getDOMKeyboardEventAltGraphKey :: (MonadIO m, IsDOMKeyboardEvent o) => o -> m Bool
getDOMKeyboardEventAltGraphKey :: forall (m :: * -> *) o.
(MonadIO m, IsDOMKeyboardEvent o) =>
o -> m Bool
getDOMKeyboardEventAltGraphKey o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"alt-graph-key"
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventAltGraphKeyPropertyInfo
instance AttrInfo DOMKeyboardEventAltGraphKeyPropertyInfo where
type AttrAllowedOps DOMKeyboardEventAltGraphKeyPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DOMKeyboardEventAltGraphKeyPropertyInfo = IsDOMKeyboardEvent
type AttrSetTypeConstraint DOMKeyboardEventAltGraphKeyPropertyInfo = (~) ()
type AttrTransferTypeConstraint DOMKeyboardEventAltGraphKeyPropertyInfo = (~) ()
type AttrTransferType DOMKeyboardEventAltGraphKeyPropertyInfo = ()
type AttrGetType DOMKeyboardEventAltGraphKeyPropertyInfo = Bool
type AttrLabel DOMKeyboardEventAltGraphKeyPropertyInfo = "alt-graph-key"
type AttrOrigin DOMKeyboardEventAltGraphKeyPropertyInfo = DOMKeyboardEvent
attrGet = getDOMKeyboardEventAltGraphKey
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.altGraphKey"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#g:attr:altGraphKey"
})
#endif
getDOMKeyboardEventAltKey :: (MonadIO m, IsDOMKeyboardEvent o) => o -> m Bool
getDOMKeyboardEventAltKey :: forall (m :: * -> *) o.
(MonadIO m, IsDOMKeyboardEvent o) =>
o -> m Bool
getDOMKeyboardEventAltKey o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"alt-key"
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventAltKeyPropertyInfo
instance AttrInfo DOMKeyboardEventAltKeyPropertyInfo where
type AttrAllowedOps DOMKeyboardEventAltKeyPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DOMKeyboardEventAltKeyPropertyInfo = IsDOMKeyboardEvent
type AttrSetTypeConstraint DOMKeyboardEventAltKeyPropertyInfo = (~) ()
type AttrTransferTypeConstraint DOMKeyboardEventAltKeyPropertyInfo = (~) ()
type AttrTransferType DOMKeyboardEventAltKeyPropertyInfo = ()
type AttrGetType DOMKeyboardEventAltKeyPropertyInfo = Bool
type AttrLabel DOMKeyboardEventAltKeyPropertyInfo = "alt-key"
type AttrOrigin DOMKeyboardEventAltKeyPropertyInfo = DOMKeyboardEvent
attrGet = getDOMKeyboardEventAltKey
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.altKey"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#g:attr:altKey"
})
#endif
getDOMKeyboardEventCtrlKey :: (MonadIO m, IsDOMKeyboardEvent o) => o -> m Bool
getDOMKeyboardEventCtrlKey :: forall (m :: * -> *) o.
(MonadIO m, IsDOMKeyboardEvent o) =>
o -> m Bool
getDOMKeyboardEventCtrlKey o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"ctrl-key"
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventCtrlKeyPropertyInfo
instance AttrInfo DOMKeyboardEventCtrlKeyPropertyInfo where
type AttrAllowedOps DOMKeyboardEventCtrlKeyPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DOMKeyboardEventCtrlKeyPropertyInfo = IsDOMKeyboardEvent
type AttrSetTypeConstraint DOMKeyboardEventCtrlKeyPropertyInfo = (~) ()
type AttrTransferTypeConstraint DOMKeyboardEventCtrlKeyPropertyInfo = (~) ()
type AttrTransferType DOMKeyboardEventCtrlKeyPropertyInfo = ()
type AttrGetType DOMKeyboardEventCtrlKeyPropertyInfo = Bool
type AttrLabel DOMKeyboardEventCtrlKeyPropertyInfo = "ctrl-key"
type AttrOrigin DOMKeyboardEventCtrlKeyPropertyInfo = DOMKeyboardEvent
attrGet = getDOMKeyboardEventCtrlKey
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.ctrlKey"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#g:attr:ctrlKey"
})
#endif
getDOMKeyboardEventKeyIdentifier :: (MonadIO m, IsDOMKeyboardEvent o) => o -> m (Maybe T.Text)
getDOMKeyboardEventKeyIdentifier :: forall (m :: * -> *) o.
(MonadIO m, IsDOMKeyboardEvent o) =>
o -> m (Maybe Text)
getDOMKeyboardEventKeyIdentifier o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe 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-identifier"
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventKeyIdentifierPropertyInfo
instance AttrInfo DOMKeyboardEventKeyIdentifierPropertyInfo where
type AttrAllowedOps DOMKeyboardEventKeyIdentifierPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DOMKeyboardEventKeyIdentifierPropertyInfo = IsDOMKeyboardEvent
type AttrSetTypeConstraint DOMKeyboardEventKeyIdentifierPropertyInfo = (~) ()
type AttrTransferTypeConstraint DOMKeyboardEventKeyIdentifierPropertyInfo = (~) ()
type AttrTransferType DOMKeyboardEventKeyIdentifierPropertyInfo = ()
type AttrGetType DOMKeyboardEventKeyIdentifierPropertyInfo = (Maybe T.Text)
type AttrLabel DOMKeyboardEventKeyIdentifierPropertyInfo = "key-identifier"
type AttrOrigin DOMKeyboardEventKeyIdentifierPropertyInfo = DOMKeyboardEvent
attrGet = getDOMKeyboardEventKeyIdentifier
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.keyIdentifier"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#g:attr:keyIdentifier"
})
#endif
getDOMKeyboardEventKeyLocation :: (MonadIO m, IsDOMKeyboardEvent o) => o -> m CULong
getDOMKeyboardEventKeyLocation :: forall (m :: * -> *) o.
(MonadIO m, IsDOMKeyboardEvent o) =>
o -> m CULong
getDOMKeyboardEventKeyLocation o
obj = IO CULong -> m CULong
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO CULong -> m CULong) -> IO CULong -> m CULong
forall a b. (a -> b) -> a -> b
$ o -> String -> IO CULong
forall a. GObject a => a -> String -> IO CULong
B.Properties.getObjectPropertyULong o
obj String
"key-location"
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventKeyLocationPropertyInfo
instance AttrInfo DOMKeyboardEventKeyLocationPropertyInfo where
type AttrAllowedOps DOMKeyboardEventKeyLocationPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DOMKeyboardEventKeyLocationPropertyInfo = IsDOMKeyboardEvent
type AttrSetTypeConstraint DOMKeyboardEventKeyLocationPropertyInfo = (~) ()
type AttrTransferTypeConstraint DOMKeyboardEventKeyLocationPropertyInfo = (~) ()
type AttrTransferType DOMKeyboardEventKeyLocationPropertyInfo = ()
type AttrGetType DOMKeyboardEventKeyLocationPropertyInfo = CULong
type AttrLabel DOMKeyboardEventKeyLocationPropertyInfo = "key-location"
type AttrOrigin DOMKeyboardEventKeyLocationPropertyInfo = DOMKeyboardEvent
attrGet = getDOMKeyboardEventKeyLocation
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.keyLocation"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#g:attr:keyLocation"
})
#endif
getDOMKeyboardEventMetaKey :: (MonadIO m, IsDOMKeyboardEvent o) => o -> m Bool
getDOMKeyboardEventMetaKey :: forall (m :: * -> *) o.
(MonadIO m, IsDOMKeyboardEvent o) =>
o -> m Bool
getDOMKeyboardEventMetaKey o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"meta-key"
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventMetaKeyPropertyInfo
instance AttrInfo DOMKeyboardEventMetaKeyPropertyInfo where
type AttrAllowedOps DOMKeyboardEventMetaKeyPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DOMKeyboardEventMetaKeyPropertyInfo = IsDOMKeyboardEvent
type AttrSetTypeConstraint DOMKeyboardEventMetaKeyPropertyInfo = (~) ()
type AttrTransferTypeConstraint DOMKeyboardEventMetaKeyPropertyInfo = (~) ()
type AttrTransferType DOMKeyboardEventMetaKeyPropertyInfo = ()
type AttrGetType DOMKeyboardEventMetaKeyPropertyInfo = Bool
type AttrLabel DOMKeyboardEventMetaKeyPropertyInfo = "meta-key"
type AttrOrigin DOMKeyboardEventMetaKeyPropertyInfo = DOMKeyboardEvent
attrGet = getDOMKeyboardEventMetaKey
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.metaKey"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#g:attr:metaKey"
})
#endif
getDOMKeyboardEventShiftKey :: (MonadIO m, IsDOMKeyboardEvent o) => o -> m Bool
getDOMKeyboardEventShiftKey :: forall (m :: * -> *) o.
(MonadIO m, IsDOMKeyboardEvent o) =>
o -> m Bool
getDOMKeyboardEventShiftKey o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"shift-key"
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventShiftKeyPropertyInfo
instance AttrInfo DOMKeyboardEventShiftKeyPropertyInfo where
type AttrAllowedOps DOMKeyboardEventShiftKeyPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DOMKeyboardEventShiftKeyPropertyInfo = IsDOMKeyboardEvent
type AttrSetTypeConstraint DOMKeyboardEventShiftKeyPropertyInfo = (~) ()
type AttrTransferTypeConstraint DOMKeyboardEventShiftKeyPropertyInfo = (~) ()
type AttrTransferType DOMKeyboardEventShiftKeyPropertyInfo = ()
type AttrGetType DOMKeyboardEventShiftKeyPropertyInfo = Bool
type AttrLabel DOMKeyboardEventShiftKeyPropertyInfo = "shift-key"
type AttrOrigin DOMKeyboardEventShiftKeyPropertyInfo = DOMKeyboardEvent
attrGet = getDOMKeyboardEventShiftKey
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.shiftKey"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#g:attr:shiftKey"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DOMKeyboardEvent
type instance O.AttributeList DOMKeyboardEvent = DOMKeyboardEventAttributeList
type DOMKeyboardEventAttributeList = ('[ '("altGraphKey", DOMKeyboardEventAltGraphKeyPropertyInfo), '("altKey", DOMKeyboardEventAltKeyPropertyInfo), '("bubbles", WebKit2WebExtension.DOMEvent.DOMEventBubblesPropertyInfo), '("cancelBubble", WebKit2WebExtension.DOMEvent.DOMEventCancelBubblePropertyInfo), '("cancelable", WebKit2WebExtension.DOMEvent.DOMEventCancelablePropertyInfo), '("charCode", WebKit2WebExtension.DOMUIEvent.DOMUIEventCharCodePropertyInfo), '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("ctrlKey", DOMKeyboardEventCtrlKeyPropertyInfo), '("currentTarget", WebKit2WebExtension.DOMEvent.DOMEventCurrentTargetPropertyInfo), '("detail", WebKit2WebExtension.DOMUIEvent.DOMUIEventDetailPropertyInfo), '("eventPhase", WebKit2WebExtension.DOMEvent.DOMEventEventPhasePropertyInfo), '("keyCode", WebKit2WebExtension.DOMUIEvent.DOMUIEventKeyCodePropertyInfo), '("keyIdentifier", DOMKeyboardEventKeyIdentifierPropertyInfo), '("keyLocation", DOMKeyboardEventKeyLocationPropertyInfo), '("layerX", WebKit2WebExtension.DOMUIEvent.DOMUIEventLayerXPropertyInfo), '("layerY", WebKit2WebExtension.DOMUIEvent.DOMUIEventLayerYPropertyInfo), '("metaKey", DOMKeyboardEventMetaKeyPropertyInfo), '("pageX", WebKit2WebExtension.DOMUIEvent.DOMUIEventPageXPropertyInfo), '("pageY", WebKit2WebExtension.DOMUIEvent.DOMUIEventPageYPropertyInfo), '("returnValue", WebKit2WebExtension.DOMEvent.DOMEventReturnValuePropertyInfo), '("shiftKey", DOMKeyboardEventShiftKeyPropertyInfo), '("srcElement", WebKit2WebExtension.DOMEvent.DOMEventSrcElementPropertyInfo), '("target", WebKit2WebExtension.DOMEvent.DOMEventTargetPropertyInfo), '("timeStamp", WebKit2WebExtension.DOMEvent.DOMEventTimeStampPropertyInfo), '("type", WebKit2WebExtension.DOMEvent.DOMEventTypePropertyInfo), '("view", WebKit2WebExtension.DOMUIEvent.DOMUIEventViewPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
dOMKeyboardEventAltGraphKey :: AttrLabelProxy "altGraphKey"
dOMKeyboardEventAltGraphKey = AttrLabelProxy
dOMKeyboardEventAltKey :: AttrLabelProxy "altKey"
dOMKeyboardEventAltKey = AttrLabelProxy
dOMKeyboardEventCtrlKey :: AttrLabelProxy "ctrlKey"
dOMKeyboardEventCtrlKey = AttrLabelProxy
dOMKeyboardEventKeyIdentifier :: AttrLabelProxy "keyIdentifier"
dOMKeyboardEventKeyIdentifier = AttrLabelProxy
dOMKeyboardEventKeyLocation :: AttrLabelProxy "keyLocation"
dOMKeyboardEventKeyLocation = AttrLabelProxy
dOMKeyboardEventMetaKey :: AttrLabelProxy "metaKey"
dOMKeyboardEventMetaKey = AttrLabelProxy
dOMKeyboardEventShiftKey :: AttrLabelProxy "shiftKey"
dOMKeyboardEventShiftKey = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DOMKeyboardEvent = DOMKeyboardEventSignalList
type DOMKeyboardEventSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "webkit_dom_keyboard_event_get_alt_graph_key" webkit_dom_keyboard_event_get_alt_graph_key ::
Ptr DOMKeyboardEvent ->
IO CInt
{-# DEPRECATED dOMKeyboardEventGetAltGraphKey ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMKeyboardEventGetAltGraphKey ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a
-> m Bool
dOMKeyboardEventGetAltGraphKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a -> m Bool
dOMKeyboardEventGetAltGraphKey a
self = IO Bool -> m Bool
forall a. IO a -> m a
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 DOMKeyboardEvent
self' <- a -> IO (Ptr DOMKeyboardEvent)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr DOMKeyboardEvent -> IO CInt
webkit_dom_keyboard_event_get_alt_graph_key Ptr DOMKeyboardEvent
self'
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
self
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventGetAltGraphKeyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDOMKeyboardEvent a) => O.OverloadedMethod DOMKeyboardEventGetAltGraphKeyMethodInfo a signature where
overloadedMethod = dOMKeyboardEventGetAltGraphKey
instance O.OverloadedMethodInfo DOMKeyboardEventGetAltGraphKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.dOMKeyboardEventGetAltGraphKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#v:dOMKeyboardEventGetAltGraphKey"
})
#endif
foreign import ccall "webkit_dom_keyboard_event_get_alt_key" webkit_dom_keyboard_event_get_alt_key ::
Ptr DOMKeyboardEvent ->
IO CInt
{-# DEPRECATED dOMKeyboardEventGetAltKey ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMKeyboardEventGetAltKey ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a
-> m Bool
dOMKeyboardEventGetAltKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a -> m Bool
dOMKeyboardEventGetAltKey a
self = IO Bool -> m Bool
forall a. IO a -> m a
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 DOMKeyboardEvent
self' <- a -> IO (Ptr DOMKeyboardEvent)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr DOMKeyboardEvent -> IO CInt
webkit_dom_keyboard_event_get_alt_key Ptr DOMKeyboardEvent
self'
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
self
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventGetAltKeyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDOMKeyboardEvent a) => O.OverloadedMethod DOMKeyboardEventGetAltKeyMethodInfo a signature where
overloadedMethod = dOMKeyboardEventGetAltKey
instance O.OverloadedMethodInfo DOMKeyboardEventGetAltKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.dOMKeyboardEventGetAltKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#v:dOMKeyboardEventGetAltKey"
})
#endif
foreign import ccall "webkit_dom_keyboard_event_get_ctrl_key" webkit_dom_keyboard_event_get_ctrl_key ::
Ptr DOMKeyboardEvent ->
IO CInt
{-# DEPRECATED dOMKeyboardEventGetCtrlKey ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMKeyboardEventGetCtrlKey ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a
-> m Bool
dOMKeyboardEventGetCtrlKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a -> m Bool
dOMKeyboardEventGetCtrlKey a
self = IO Bool -> m Bool
forall a. IO a -> m a
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 DOMKeyboardEvent
self' <- a -> IO (Ptr DOMKeyboardEvent)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr DOMKeyboardEvent -> IO CInt
webkit_dom_keyboard_event_get_ctrl_key Ptr DOMKeyboardEvent
self'
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
self
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventGetCtrlKeyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDOMKeyboardEvent a) => O.OverloadedMethod DOMKeyboardEventGetCtrlKeyMethodInfo a signature where
overloadedMethod = dOMKeyboardEventGetCtrlKey
instance O.OverloadedMethodInfo DOMKeyboardEventGetCtrlKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.dOMKeyboardEventGetCtrlKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#v:dOMKeyboardEventGetCtrlKey"
})
#endif
foreign import ccall "webkit_dom_keyboard_event_get_key_identifier" webkit_dom_keyboard_event_get_key_identifier ::
Ptr DOMKeyboardEvent ->
IO CString
{-# DEPRECATED dOMKeyboardEventGetKeyIdentifier ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMKeyboardEventGetKeyIdentifier ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a
-> m T.Text
dOMKeyboardEventGetKeyIdentifier :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a -> m Text
dOMKeyboardEventGetKeyIdentifier a
self = IO Text -> m Text
forall a. IO a -> m a
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 DOMKeyboardEvent
self' <- a -> IO (Ptr DOMKeyboardEvent)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
result <- Ptr DOMKeyboardEvent -> IO CString
webkit_dom_keyboard_event_get_key_identifier Ptr DOMKeyboardEvent
self'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dOMKeyboardEventGetKeyIdentifier" 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
self
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventGetKeyIdentifierMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMKeyboardEvent a) => O.OverloadedMethod DOMKeyboardEventGetKeyIdentifierMethodInfo a signature where
overloadedMethod = dOMKeyboardEventGetKeyIdentifier
instance O.OverloadedMethodInfo DOMKeyboardEventGetKeyIdentifierMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.dOMKeyboardEventGetKeyIdentifier",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#v:dOMKeyboardEventGetKeyIdentifier"
})
#endif
foreign import ccall "webkit_dom_keyboard_event_get_key_location" webkit_dom_keyboard_event_get_key_location ::
Ptr DOMKeyboardEvent ->
IO CULong
{-# DEPRECATED dOMKeyboardEventGetKeyLocation ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMKeyboardEventGetKeyLocation ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a
-> m CULong
dOMKeyboardEventGetKeyLocation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a -> m CULong
dOMKeyboardEventGetKeyLocation a
self = IO CULong -> m CULong
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CULong -> m CULong) -> IO CULong -> m CULong
forall a b. (a -> b) -> a -> b
$ do
Ptr DOMKeyboardEvent
self' <- a -> IO (Ptr DOMKeyboardEvent)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CULong
result <- Ptr DOMKeyboardEvent -> IO CULong
webkit_dom_keyboard_event_get_key_location Ptr DOMKeyboardEvent
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CULong -> IO CULong
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CULong
result
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventGetKeyLocationMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMKeyboardEvent a) => O.OverloadedMethod DOMKeyboardEventGetKeyLocationMethodInfo a signature where
overloadedMethod = dOMKeyboardEventGetKeyLocation
instance O.OverloadedMethodInfo DOMKeyboardEventGetKeyLocationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.dOMKeyboardEventGetKeyLocation",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#v:dOMKeyboardEventGetKeyLocation"
})
#endif
foreign import ccall "webkit_dom_keyboard_event_get_meta_key" webkit_dom_keyboard_event_get_meta_key ::
Ptr DOMKeyboardEvent ->
IO CInt
{-# DEPRECATED dOMKeyboardEventGetMetaKey ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMKeyboardEventGetMetaKey ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a
-> m Bool
dOMKeyboardEventGetMetaKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a -> m Bool
dOMKeyboardEventGetMetaKey a
self = IO Bool -> m Bool
forall a. IO a -> m a
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 DOMKeyboardEvent
self' <- a -> IO (Ptr DOMKeyboardEvent)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr DOMKeyboardEvent -> IO CInt
webkit_dom_keyboard_event_get_meta_key Ptr DOMKeyboardEvent
self'
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
self
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventGetMetaKeyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDOMKeyboardEvent a) => O.OverloadedMethod DOMKeyboardEventGetMetaKeyMethodInfo a signature where
overloadedMethod = dOMKeyboardEventGetMetaKey
instance O.OverloadedMethodInfo DOMKeyboardEventGetMetaKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.dOMKeyboardEventGetMetaKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#v:dOMKeyboardEventGetMetaKey"
})
#endif
foreign import ccall "webkit_dom_keyboard_event_get_modifier_state" webkit_dom_keyboard_event_get_modifier_state ::
Ptr DOMKeyboardEvent ->
CString ->
IO CInt
{-# DEPRECATED dOMKeyboardEventGetModifierState ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMKeyboardEventGetModifierState ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a
-> T.Text
-> m Bool
dOMKeyboardEventGetModifierState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a -> Text -> m Bool
dOMKeyboardEventGetModifierState a
self Text
keyIdentifierArg = IO Bool -> m Bool
forall a. IO a -> m a
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 DOMKeyboardEvent
self' <- a -> IO (Ptr DOMKeyboardEvent)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
keyIdentifierArg' <- Text -> IO CString
textToCString Text
keyIdentifierArg
CInt
result <- Ptr DOMKeyboardEvent -> CString -> IO CInt
webkit_dom_keyboard_event_get_modifier_state Ptr DOMKeyboardEvent
self' CString
keyIdentifierArg'
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
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
keyIdentifierArg'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventGetModifierStateMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsDOMKeyboardEvent a) => O.OverloadedMethod DOMKeyboardEventGetModifierStateMethodInfo a signature where
overloadedMethod = dOMKeyboardEventGetModifierState
instance O.OverloadedMethodInfo DOMKeyboardEventGetModifierStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.dOMKeyboardEventGetModifierState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#v:dOMKeyboardEventGetModifierState"
})
#endif
foreign import ccall "webkit_dom_keyboard_event_get_shift_key" webkit_dom_keyboard_event_get_shift_key ::
Ptr DOMKeyboardEvent ->
IO CInt
{-# DEPRECATED dOMKeyboardEventGetShiftKey ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMKeyboardEventGetShiftKey ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a
-> m Bool
dOMKeyboardEventGetShiftKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDOMKeyboardEvent a) =>
a -> m Bool
dOMKeyboardEventGetShiftKey a
self = IO Bool -> m Bool
forall a. IO a -> m a
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 DOMKeyboardEvent
self' <- a -> IO (Ptr DOMKeyboardEvent)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr DOMKeyboardEvent -> IO CInt
webkit_dom_keyboard_event_get_shift_key Ptr DOMKeyboardEvent
self'
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
self
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventGetShiftKeyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDOMKeyboardEvent a) => O.OverloadedMethod DOMKeyboardEventGetShiftKeyMethodInfo a signature where
overloadedMethod = dOMKeyboardEventGetShiftKey
instance O.OverloadedMethodInfo DOMKeyboardEventGetShiftKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.dOMKeyboardEventGetShiftKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#v:dOMKeyboardEventGetShiftKey"
})
#endif
foreign import ccall "webkit_dom_keyboard_event_init_keyboard_event" webkit_dom_keyboard_event_init_keyboard_event ::
Ptr DOMKeyboardEvent ->
CString ->
CInt ->
CInt ->
Ptr WebKit2WebExtension.DOMDOMWindow.DOMDOMWindow ->
CString ->
CULong ->
CInt ->
CInt ->
CInt ->
CInt ->
CInt ->
IO ()
{-# DEPRECATED dOMKeyboardEventInitKeyboardEvent ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMKeyboardEventInitKeyboardEvent ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMKeyboardEvent a, WebKit2WebExtension.DOMDOMWindow.IsDOMDOMWindow b) =>
a
-> T.Text
-> Bool
-> Bool
-> b
-> T.Text
-> CULong
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> m ()
dOMKeyboardEventInitKeyboardEvent :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDOMKeyboardEvent a,
IsDOMDOMWindow b) =>
a
-> Text
-> Bool
-> Bool
-> b
-> Text
-> CULong
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> m ()
dOMKeyboardEventInitKeyboardEvent a
self Text
type_ Bool
canBubble Bool
cancelable b
view Text
keyIdentifier CULong
location Bool
ctrlKey Bool
altKey Bool
shiftKey Bool
metaKey Bool
altGraphKey = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DOMKeyboardEvent
self' <- a -> IO (Ptr DOMKeyboardEvent)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
type_' <- Text -> IO CString
textToCString Text
type_
let canBubble' :: CInt
canBubble' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
canBubble
let cancelable' :: CInt
cancelable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
cancelable
Ptr DOMDOMWindow
view' <- b -> IO (Ptr DOMDOMWindow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
view
CString
keyIdentifier' <- Text -> IO CString
textToCString Text
keyIdentifier
let ctrlKey' :: CInt
ctrlKey' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
ctrlKey
let altKey' :: CInt
altKey' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
altKey
let shiftKey' :: CInt
shiftKey' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
shiftKey
let metaKey' :: CInt
metaKey' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
metaKey
let altGraphKey' :: CInt
altGraphKey' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
altGraphKey
Ptr DOMKeyboardEvent
-> CString
-> CInt
-> CInt
-> Ptr DOMDOMWindow
-> CString
-> CULong
-> CInt
-> CInt
-> CInt
-> CInt
-> CInt
-> IO ()
webkit_dom_keyboard_event_init_keyboard_event Ptr DOMKeyboardEvent
self' CString
type_' CInt
canBubble' CInt
cancelable' Ptr DOMDOMWindow
view' CString
keyIdentifier' CULong
location CInt
ctrlKey' CInt
altKey' CInt
shiftKey' CInt
metaKey' CInt
altGraphKey'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
view
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
type_'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
keyIdentifier'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DOMKeyboardEventInitKeyboardEventMethodInfo
instance (signature ~ (T.Text -> Bool -> Bool -> b -> T.Text -> CULong -> Bool -> Bool -> Bool -> Bool -> Bool -> m ()), MonadIO m, IsDOMKeyboardEvent a, WebKit2WebExtension.DOMDOMWindow.IsDOMDOMWindow b) => O.OverloadedMethod DOMKeyboardEventInitKeyboardEventMethodInfo a signature where
overloadedMethod = dOMKeyboardEventInitKeyboardEvent
instance O.OverloadedMethodInfo DOMKeyboardEventInitKeyboardEventMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.DOMKeyboardEvent.dOMKeyboardEventInitKeyboardEvent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-DOMKeyboardEvent.html#v:dOMKeyboardEventInitKeyboardEvent"
})
#endif