#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GdkX11.Enums
(
X11DeviceType(..) ,
) 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.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.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 qualified GHC.Records as R
data X11DeviceType =
X11DeviceTypeLogical
| X11DeviceTypePhysical
| X11DeviceTypeFloating
| AnotherX11DeviceType Int
deriving (Int -> X11DeviceType -> ShowS
[X11DeviceType] -> ShowS
X11DeviceType -> String
(Int -> X11DeviceType -> ShowS)
-> (X11DeviceType -> String)
-> ([X11DeviceType] -> ShowS)
-> Show X11DeviceType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [X11DeviceType] -> ShowS
$cshowList :: [X11DeviceType] -> ShowS
show :: X11DeviceType -> String
$cshow :: X11DeviceType -> String
showsPrec :: Int -> X11DeviceType -> ShowS
$cshowsPrec :: Int -> X11DeviceType -> ShowS
Show, X11DeviceType -> X11DeviceType -> Bool
(X11DeviceType -> X11DeviceType -> Bool)
-> (X11DeviceType -> X11DeviceType -> Bool) -> Eq X11DeviceType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: X11DeviceType -> X11DeviceType -> Bool
$c/= :: X11DeviceType -> X11DeviceType -> Bool
== :: X11DeviceType -> X11DeviceType -> Bool
$c== :: X11DeviceType -> X11DeviceType -> Bool
Eq)
instance P.Enum X11DeviceType where
fromEnum :: X11DeviceType -> Int
fromEnum X11DeviceType
X11DeviceTypeLogical = Int
0
fromEnum X11DeviceType
X11DeviceTypePhysical = Int
1
fromEnum X11DeviceType
X11DeviceTypeFloating = Int
2
fromEnum (AnotherX11DeviceType Int
k) = Int
k
toEnum :: Int -> X11DeviceType
toEnum Int
0 = X11DeviceType
X11DeviceTypeLogical
toEnum Int
1 = X11DeviceType
X11DeviceTypePhysical
toEnum Int
2 = X11DeviceType
X11DeviceTypeFloating
toEnum Int
k = Int -> X11DeviceType
AnotherX11DeviceType Int
k
instance P.Ord X11DeviceType where
compare :: X11DeviceType -> X11DeviceType -> Ordering
compare X11DeviceType
a X11DeviceType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (X11DeviceType -> Int
forall a. Enum a => a -> Int
P.fromEnum X11DeviceType
a) (X11DeviceType -> Int
forall a. Enum a => a -> Int
P.fromEnum X11DeviceType
b)