diff --git a/src/Quasar/Wayland/Protocol.hs b/src/Quasar/Wayland/Protocol.hs index 6348d338e31601350e1a503cfc009fa535b06c2d..002f22a138b84eddc4247af74820b15322dee938 100644 --- a/src/Quasar/Wayland/Protocol.hs +++ b/src/Quasar/Wayland/Protocol.hs @@ -10,7 +10,7 @@ module Quasar.Wayland.Protocol ( getMessageHandler, -- ** Wayland types - Fixed(..), + WlFixed(..), WlString(..), toString, diff --git a/src/Quasar/Wayland/Protocol/Core.hs b/src/Quasar/Wayland/Protocol/Core.hs index b34376809883611d0917ec2d63b2c631b3f9f2d3..a27e54b1069347e96caf10988ce6edfead39c3a1 100644 --- a/src/Quasar/Wayland/Protocol/Core.hs +++ b/src/Quasar/Wayland/Protocol/Core.hs @@ -6,7 +6,7 @@ module Quasar.Wayland.Protocol.Core ( NewId, GenericNewId, Opcode, - Fixed(..), + WlFixed(..), WlString(..), toString, fromString, @@ -115,10 +115,10 @@ data GenericNewId = GenericNewId WlString Version Word32 -- | Signed 24.8 decimal numbers. -newtype Fixed = Fixed Word32 +newtype WlFixed = WlFixed Word32 deriving newtype Eq -instance Show Fixed where +instance Show WlFixed where show x = "[fixed " <> show x <> "]" @@ -162,9 +162,9 @@ instance WireFormat Word32 where getArgument = pure <$> getWord32host showArgument = show -instance WireFormat Fixed where - putArgument (Fixed repr) = pure $ MessagePart (putWord32host repr) 4 mempty - getArgument = pure . Fixed <$> getWord32host +instance WireFormat WlFixed where + putArgument (WlFixed repr) = pure $ MessagePart (putWord32host repr) 4 mempty + getArgument = pure . WlFixed <$> getWord32host showArgument = show instance WireFormat WlString where diff --git a/src/Quasar/Wayland/Protocol/TH.hs b/src/Quasar/Wayland/Protocol/TH.hs index 6a45f3d17aee9d045b7be2d365253f6843d28d2c..b15df19043f95b609e1f76a655347bc4a84e6f88 100644 --- a/src/Quasar/Wayland/Protocol/TH.hs +++ b/src/Quasar/Wayland/Protocol/TH.hs @@ -498,7 +498,7 @@ argumentWireType argSpec = liftArgumentWireType argSpec.argType liftArgumentWireType :: ArgumentType -> Q Type liftArgumentWireType IntArgument = [t|Int32|] liftArgumentWireType UIntArgument = [t|Word32|] -liftArgumentWireType FixedArgument = [t|Fixed|] +liftArgumentWireType FixedArgument = [t|WlFixed|] liftArgumentWireType StringArgument = [t|WlString|] liftArgumentWireType ArrayArgument = [t|BS.ByteString|] liftArgumentWireType (ObjectArgument iName) = [t|ObjectId $(litT (strTyLit iName))|]