aboutsummaryrefslogtreecommitdiff
path: root/plug/src/Montis/Core/ButtonEvent.hs
blob: a8b336eccaddfab2dcc8fa0411343b9f4c5b679b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# OPTIONS_GHC -Wno-missing-export-lists #-}
module Montis.Core.ButtonEvent where

import Montis.Foreign.WlRoots
import Data.Word (Word32)
import Foreign (Ptr)

data ButtonState = ButtonReleased | ButtonPressed deriving (Show, Read, Eq, Enum, Ord)

data ButtonEvent = ButtonEvent {
  pointer :: Ptr WlrPointer,
  timeMs :: Word32,
  button :: Word32,
  modifiers :: Word32,
  state :: ButtonState
} deriving (Eq, Show, Ord)