{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) A #GdkKeymapKey is a hardware key that can be mapped to a keyval. -} module GI.Gdk.Structs.KeymapKey ( -- * Exported types KeymapKey(..) , noKeymapKey , -- * Properties -- ** Group keymapKeyReadGroup , -- ** Keycode keymapKeyReadKeycode , -- ** Level keymapKeyReadLevel , ) 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.Gdk.Types import GI.Gdk.Callbacks newtype KeymapKey = KeymapKey (ForeignPtr KeymapKey) noKeymapKey :: Maybe KeymapKey noKeymapKey = Nothing keymapKeyReadKeycode :: KeymapKey -> IO Word32 keymapKeyReadKeycode s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 0) :: IO Word32 return val keymapKeyReadGroup :: KeymapKey -> IO Int32 keymapKeyReadGroup s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 4) :: IO Int32 return val keymapKeyReadLevel :: KeymapKey -> IO Int32 keymapKeyReadLevel s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 8) :: IO Int32 return val