{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.WebKit.Objects.DOMKeyboardEvent
    ( 

-- * Exported types
    DOMKeyboardEvent(..)                    ,
    DOMKeyboardEventK                       ,
    toDOMKeyboardEvent                      ,
    noDOMKeyboardEvent                      ,


 -- * Methods
-- ** dOMKeyboardEventGetAltGraphKey
    dOMKeyboardEventGetAltGraphKey          ,


-- ** dOMKeyboardEventGetAltKey
    dOMKeyboardEventGetAltKey               ,


-- ** dOMKeyboardEventGetCtrlKey
    dOMKeyboardEventGetCtrlKey              ,


-- ** dOMKeyboardEventGetKeyIdentifier
    dOMKeyboardEventGetKeyIdentifier        ,


-- ** dOMKeyboardEventGetKeyLocation
    dOMKeyboardEventGetKeyLocation          ,


-- ** dOMKeyboardEventGetMetaKey
    dOMKeyboardEventGetMetaKey              ,


-- ** dOMKeyboardEventGetModifierState
    dOMKeyboardEventGetModifierState        ,


-- ** dOMKeyboardEventGetShiftKey
    dOMKeyboardEventGetShiftKey             ,


-- ** dOMKeyboardEventInitKeyboardEvent
    dOMKeyboardEventInitKeyboardEvent       ,




 -- * Properties
-- ** AltGraphKey
    DOMKeyboardEventAltGraphKeyPropertyInfo ,
    getDOMKeyboardEventAltGraphKey          ,


-- ** AltKey
    DOMKeyboardEventAltKeyPropertyInfo      ,
    getDOMKeyboardEventAltKey               ,


-- ** CtrlKey
    DOMKeyboardEventCtrlKeyPropertyInfo     ,
    getDOMKeyboardEventCtrlKey              ,


-- ** KeyIdentifier
    DOMKeyboardEventKeyIdentifierPropertyInfo,
    getDOMKeyboardEventKeyIdentifier        ,


-- ** KeyLocation
    DOMKeyboardEventKeyLocationPropertyInfo ,
    getDOMKeyboardEventKeyLocation          ,


-- ** MetaKey
    DOMKeyboardEventMetaKeyPropertyInfo     ,
    getDOMKeyboardEventMetaKey              ,


-- ** ShiftKey
    DOMKeyboardEventShiftKeyPropertyInfo    ,
    getDOMKeyboardEventShiftKey             ,




    ) where

import Prelude ()
import Data.GI.Base.ShortPrelude

import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map

import GI.WebKit.Types
import GI.WebKit.Callbacks
import qualified GI.GObject as GObject

newtype DOMKeyboardEvent = DOMKeyboardEvent (ForeignPtr DOMKeyboardEvent)
foreign import ccall "webkit_dom_keyboard_event_get_type"
    c_webkit_dom_keyboard_event_get_type :: IO GType

type instance ParentTypes DOMKeyboardEvent = DOMKeyboardEventParentTypes
type DOMKeyboardEventParentTypes = '[DOMUIEvent, DOMEvent, DOMObject, GObject.Object]

instance GObject DOMKeyboardEvent where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_dom_keyboard_event_get_type
    

class GObject o => DOMKeyboardEventK o
instance (GObject o, IsDescendantOf DOMKeyboardEvent o) => DOMKeyboardEventK o

toDOMKeyboardEvent :: DOMKeyboardEventK o => o -> IO DOMKeyboardEvent
toDOMKeyboardEvent = unsafeCastTo DOMKeyboardEvent

noDOMKeyboardEvent :: Maybe DOMKeyboardEvent
noDOMKeyboardEvent = Nothing

-- VVV Prop "alt-graph-key"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]

getDOMKeyboardEventAltGraphKey :: (MonadIO m, DOMKeyboardEventK o) => o -> m Bool
getDOMKeyboardEventAltGraphKey obj = liftIO $ getObjectPropertyBool obj "alt-graph-key"

data DOMKeyboardEventAltGraphKeyPropertyInfo
instance AttrInfo DOMKeyboardEventAltGraphKeyPropertyInfo where
    type AttrAllowedOps DOMKeyboardEventAltGraphKeyPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMKeyboardEventAltGraphKeyPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMKeyboardEventAltGraphKeyPropertyInfo = DOMKeyboardEventK
    type AttrGetType DOMKeyboardEventAltGraphKeyPropertyInfo = Bool
    type AttrLabel DOMKeyboardEventAltGraphKeyPropertyInfo = "DOMKeyboardEvent::alt-graph-key"
    attrGet _ = getDOMKeyboardEventAltGraphKey
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "alt-key"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]

getDOMKeyboardEventAltKey :: (MonadIO m, DOMKeyboardEventK o) => o -> m Bool
getDOMKeyboardEventAltKey obj = liftIO $ getObjectPropertyBool obj "alt-key"

data DOMKeyboardEventAltKeyPropertyInfo
instance AttrInfo DOMKeyboardEventAltKeyPropertyInfo where
    type AttrAllowedOps DOMKeyboardEventAltKeyPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMKeyboardEventAltKeyPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMKeyboardEventAltKeyPropertyInfo = DOMKeyboardEventK
    type AttrGetType DOMKeyboardEventAltKeyPropertyInfo = Bool
    type AttrLabel DOMKeyboardEventAltKeyPropertyInfo = "DOMKeyboardEvent::alt-key"
    attrGet _ = getDOMKeyboardEventAltKey
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "ctrl-key"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]

getDOMKeyboardEventCtrlKey :: (MonadIO m, DOMKeyboardEventK o) => o -> m Bool
getDOMKeyboardEventCtrlKey obj = liftIO $ getObjectPropertyBool obj "ctrl-key"

data DOMKeyboardEventCtrlKeyPropertyInfo
instance AttrInfo DOMKeyboardEventCtrlKeyPropertyInfo where
    type AttrAllowedOps DOMKeyboardEventCtrlKeyPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMKeyboardEventCtrlKeyPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMKeyboardEventCtrlKeyPropertyInfo = DOMKeyboardEventK
    type AttrGetType DOMKeyboardEventCtrlKeyPropertyInfo = Bool
    type AttrLabel DOMKeyboardEventCtrlKeyPropertyInfo = "DOMKeyboardEvent::ctrl-key"
    attrGet _ = getDOMKeyboardEventCtrlKey
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "key-identifier"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]

getDOMKeyboardEventKeyIdentifier :: (MonadIO m, DOMKeyboardEventK o) => o -> m T.Text
getDOMKeyboardEventKeyIdentifier obj = liftIO $ getObjectPropertyString obj "key-identifier"

data DOMKeyboardEventKeyIdentifierPropertyInfo
instance AttrInfo DOMKeyboardEventKeyIdentifierPropertyInfo where
    type AttrAllowedOps DOMKeyboardEventKeyIdentifierPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMKeyboardEventKeyIdentifierPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMKeyboardEventKeyIdentifierPropertyInfo = DOMKeyboardEventK
    type AttrGetType DOMKeyboardEventKeyIdentifierPropertyInfo = T.Text
    type AttrLabel DOMKeyboardEventKeyIdentifierPropertyInfo = "DOMKeyboardEvent::key-identifier"
    attrGet _ = getDOMKeyboardEventKeyIdentifier
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "key-location"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable]

getDOMKeyboardEventKeyLocation :: (MonadIO m, DOMKeyboardEventK o) => o -> m Word64
getDOMKeyboardEventKeyLocation obj = liftIO $ getObjectPropertyUInt64 obj "key-location"

data DOMKeyboardEventKeyLocationPropertyInfo
instance AttrInfo DOMKeyboardEventKeyLocationPropertyInfo where
    type AttrAllowedOps DOMKeyboardEventKeyLocationPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMKeyboardEventKeyLocationPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMKeyboardEventKeyLocationPropertyInfo = DOMKeyboardEventK
    type AttrGetType DOMKeyboardEventKeyLocationPropertyInfo = Word64
    type AttrLabel DOMKeyboardEventKeyLocationPropertyInfo = "DOMKeyboardEvent::key-location"
    attrGet _ = getDOMKeyboardEventKeyLocation
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "meta-key"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]

getDOMKeyboardEventMetaKey :: (MonadIO m, DOMKeyboardEventK o) => o -> m Bool
getDOMKeyboardEventMetaKey obj = liftIO $ getObjectPropertyBool obj "meta-key"

data DOMKeyboardEventMetaKeyPropertyInfo
instance AttrInfo DOMKeyboardEventMetaKeyPropertyInfo where
    type AttrAllowedOps DOMKeyboardEventMetaKeyPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMKeyboardEventMetaKeyPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMKeyboardEventMetaKeyPropertyInfo = DOMKeyboardEventK
    type AttrGetType DOMKeyboardEventMetaKeyPropertyInfo = Bool
    type AttrLabel DOMKeyboardEventMetaKeyPropertyInfo = "DOMKeyboardEvent::meta-key"
    attrGet _ = getDOMKeyboardEventMetaKey
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "shift-key"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]

getDOMKeyboardEventShiftKey :: (MonadIO m, DOMKeyboardEventK o) => o -> m Bool
getDOMKeyboardEventShiftKey obj = liftIO $ getObjectPropertyBool obj "shift-key"

data DOMKeyboardEventShiftKeyPropertyInfo
instance AttrInfo DOMKeyboardEventShiftKeyPropertyInfo where
    type AttrAllowedOps DOMKeyboardEventShiftKeyPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMKeyboardEventShiftKeyPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMKeyboardEventShiftKeyPropertyInfo = DOMKeyboardEventK
    type AttrGetType DOMKeyboardEventShiftKeyPropertyInfo = Bool
    type AttrLabel DOMKeyboardEventShiftKeyPropertyInfo = "DOMKeyboardEvent::shift-key"
    attrGet _ = getDOMKeyboardEventShiftKey
    attrSet _ = undefined
    attrConstruct _ = undefined

type instance AttributeList DOMKeyboardEvent = DOMKeyboardEventAttributeList
type DOMKeyboardEventAttributeList = ('[ '("alt-graph-key", DOMKeyboardEventAltGraphKeyPropertyInfo), '("alt-key", DOMKeyboardEventAltKeyPropertyInfo), '("bubbles", DOMEventBubblesPropertyInfo), '("cancel-bubble", DOMEventCancelBubblePropertyInfo), '("cancelable", DOMEventCancelablePropertyInfo), '("char-code", DOMUIEventCharCodePropertyInfo), '("core-object", DOMObjectCoreObjectPropertyInfo), '("ctrl-key", DOMKeyboardEventCtrlKeyPropertyInfo), '("current-target", DOMEventCurrentTargetPropertyInfo), '("default-prevented", DOMEventDefaultPreventedPropertyInfo), '("detail", DOMUIEventDetailPropertyInfo), '("event-phase", DOMEventEventPhasePropertyInfo), '("key-code", DOMUIEventKeyCodePropertyInfo), '("key-identifier", DOMKeyboardEventKeyIdentifierPropertyInfo), '("key-location", DOMKeyboardEventKeyLocationPropertyInfo), '("layer-x", DOMUIEventLayerXPropertyInfo), '("layer-y", DOMUIEventLayerYPropertyInfo), '("meta-key", DOMKeyboardEventMetaKeyPropertyInfo), '("page-x", DOMUIEventPageXPropertyInfo), '("page-y", DOMUIEventPageYPropertyInfo), '("return-value", DOMEventReturnValuePropertyInfo), '("shift-key", DOMKeyboardEventShiftKeyPropertyInfo), '("src-element", DOMEventSrcElementPropertyInfo), '("target", DOMEventTargetPropertyInfo), '("time-stamp", DOMEventTimeStampPropertyInfo), '("type", DOMEventTypePropertyInfo), '("view", DOMUIEventViewPropertyInfo), '("which", DOMUIEventWhichPropertyInfo)] :: [(Symbol, *)])

type instance SignalList DOMKeyboardEvent = DOMKeyboardEventSignalList
type DOMKeyboardEventSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method DOMKeyboardEvent::get_alt_graph_key
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_keyboard_event_get_alt_graph_key" webkit_dom_keyboard_event_get_alt_graph_key :: 
    Ptr DOMKeyboardEvent ->                 -- _obj : TInterface "WebKit" "DOMKeyboardEvent"
    IO CInt


dOMKeyboardEventGetAltGraphKey ::
    (MonadIO m, DOMKeyboardEventK a) =>
    a ->                                    -- _obj
    m Bool
dOMKeyboardEventGetAltGraphKey _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_keyboard_event_get_alt_graph_key _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method DOMKeyboardEvent::get_alt_key
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_keyboard_event_get_alt_key" webkit_dom_keyboard_event_get_alt_key :: 
    Ptr DOMKeyboardEvent ->                 -- _obj : TInterface "WebKit" "DOMKeyboardEvent"
    IO CInt


dOMKeyboardEventGetAltKey ::
    (MonadIO m, DOMKeyboardEventK a) =>
    a ->                                    -- _obj
    m Bool
dOMKeyboardEventGetAltKey _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_keyboard_event_get_alt_key _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method DOMKeyboardEvent::get_ctrl_key
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_keyboard_event_get_ctrl_key" webkit_dom_keyboard_event_get_ctrl_key :: 
    Ptr DOMKeyboardEvent ->                 -- _obj : TInterface "WebKit" "DOMKeyboardEvent"
    IO CInt


dOMKeyboardEventGetCtrlKey ::
    (MonadIO m, DOMKeyboardEventK a) =>
    a ->                                    -- _obj
    m Bool
dOMKeyboardEventGetCtrlKey _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_keyboard_event_get_ctrl_key _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method DOMKeyboardEvent::get_key_identifier
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_keyboard_event_get_key_identifier" webkit_dom_keyboard_event_get_key_identifier :: 
    Ptr DOMKeyboardEvent ->                 -- _obj : TInterface "WebKit" "DOMKeyboardEvent"
    IO CString


dOMKeyboardEventGetKeyIdentifier ::
    (MonadIO m, DOMKeyboardEventK a) =>
    a ->                                    -- _obj
    m T.Text
dOMKeyboardEventGetKeyIdentifier _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_keyboard_event_get_key_identifier _obj'
    checkUnexpectedReturnNULL "webkit_dom_keyboard_event_get_key_identifier" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method DOMKeyboardEvent::get_key_location
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_keyboard_event_get_key_location" webkit_dom_keyboard_event_get_key_location :: 
    Ptr DOMKeyboardEvent ->                 -- _obj : TInterface "WebKit" "DOMKeyboardEvent"
    IO Word64


dOMKeyboardEventGetKeyLocation ::
    (MonadIO m, DOMKeyboardEventK a) =>
    a ->                                    -- _obj
    m Word64
dOMKeyboardEventGetKeyLocation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_keyboard_event_get_key_location _obj'
    touchManagedPtr _obj
    return result

-- method DOMKeyboardEvent::get_meta_key
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_keyboard_event_get_meta_key" webkit_dom_keyboard_event_get_meta_key :: 
    Ptr DOMKeyboardEvent ->                 -- _obj : TInterface "WebKit" "DOMKeyboardEvent"
    IO CInt


dOMKeyboardEventGetMetaKey ::
    (MonadIO m, DOMKeyboardEventK a) =>
    a ->                                    -- _obj
    m Bool
dOMKeyboardEventGetMetaKey _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_keyboard_event_get_meta_key _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method DOMKeyboardEvent::get_modifier_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyIdentifierArg", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyIdentifierArg", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_keyboard_event_get_modifier_state" webkit_dom_keyboard_event_get_modifier_state :: 
    Ptr DOMKeyboardEvent ->                 -- _obj : TInterface "WebKit" "DOMKeyboardEvent"
    CString ->                              -- keyIdentifierArg : TBasicType TUTF8
    IO CInt


dOMKeyboardEventGetModifierState ::
    (MonadIO m, DOMKeyboardEventK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- keyIdentifierArg
    m Bool
dOMKeyboardEventGetModifierState _obj keyIdentifierArg = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    keyIdentifierArg' <- textToCString keyIdentifierArg
    result <- webkit_dom_keyboard_event_get_modifier_state _obj' keyIdentifierArg'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem keyIdentifierArg'
    return result'

-- method DOMKeyboardEvent::get_shift_key
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_keyboard_event_get_shift_key" webkit_dom_keyboard_event_get_shift_key :: 
    Ptr DOMKeyboardEvent ->                 -- _obj : TInterface "WebKit" "DOMKeyboardEvent"
    IO CInt


dOMKeyboardEventGetShiftKey ::
    (MonadIO m, DOMKeyboardEventK a) =>
    a ->                                    -- _obj
    m Bool
dOMKeyboardEventGetShiftKey _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_keyboard_event_get_shift_key _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method DOMKeyboardEvent::init_keyboard_event
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "canBubble", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancelable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "view", argType = TInterface "WebKit" "DOMDOMWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyIdentifier", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ctrlKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "altKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shiftKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "metaKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "altGraphKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMKeyboardEvent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "canBubble", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancelable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "view", argType = TInterface "WebKit" "DOMDOMWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyIdentifier", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ctrlKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "altKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shiftKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "metaKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "altGraphKey", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_keyboard_event_init_keyboard_event" webkit_dom_keyboard_event_init_keyboard_event :: 
    Ptr DOMKeyboardEvent ->                 -- _obj : TInterface "WebKit" "DOMKeyboardEvent"
    CString ->                              -- type : TBasicType TUTF8
    CInt ->                                 -- canBubble : TBasicType TBoolean
    CInt ->                                 -- cancelable : TBasicType TBoolean
    Ptr DOMDOMWindow ->                     -- view : TInterface "WebKit" "DOMDOMWindow"
    CString ->                              -- keyIdentifier : TBasicType TUTF8
    Word64 ->                               -- location : TBasicType TUInt64
    CInt ->                                 -- ctrlKey : TBasicType TBoolean
    CInt ->                                 -- altKey : TBasicType TBoolean
    CInt ->                                 -- shiftKey : TBasicType TBoolean
    CInt ->                                 -- metaKey : TBasicType TBoolean
    CInt ->                                 -- altGraphKey : TBasicType TBoolean
    IO ()


dOMKeyboardEventInitKeyboardEvent ::
    (MonadIO m, DOMKeyboardEventK a, DOMDOMWindowK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- type
    Bool ->                                 -- canBubble
    Bool ->                                 -- cancelable
    b ->                                    -- view
    T.Text ->                               -- keyIdentifier
    Word64 ->                               -- location
    Bool ->                                 -- ctrlKey
    Bool ->                                 -- altKey
    Bool ->                                 -- shiftKey
    Bool ->                                 -- metaKey
    Bool ->                                 -- altGraphKey
    m ()
dOMKeyboardEventInitKeyboardEvent _obj type_ canBubble cancelable view keyIdentifier location ctrlKey altKey shiftKey metaKey altGraphKey = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    type_' <- textToCString type_
    let canBubble' = (fromIntegral . fromEnum) canBubble
    let cancelable' = (fromIntegral . fromEnum) cancelable
    let view' = unsafeManagedPtrCastPtr view
    keyIdentifier' <- textToCString keyIdentifier
    let ctrlKey' = (fromIntegral . fromEnum) ctrlKey
    let altKey' = (fromIntegral . fromEnum) altKey
    let shiftKey' = (fromIntegral . fromEnum) shiftKey
    let metaKey' = (fromIntegral . fromEnum) metaKey
    let altGraphKey' = (fromIntegral . fromEnum) altGraphKey
    webkit_dom_keyboard_event_init_keyboard_event _obj' type_' canBubble' cancelable' view' keyIdentifier' location ctrlKey' altKey' shiftKey' metaKey' altGraphKey'
    touchManagedPtr _obj
    touchManagedPtr view
    freeMem type_'
    freeMem keyIdentifier'
    return ()