Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quasar-wayland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
quasar-wayland
Commits
fe921bc6
Commit
fe921bc6
authored
3 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Add showArgument
parent
eeab2bb1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Quasar/Wayland/Protocol/Core.hs
+11
-1
11 additions, 1 deletion
src/Quasar/Wayland/Protocol/Core.hs
with
11 additions
and
1 deletion
src/Quasar/Wayland/Protocol/Core.hs
+
11
−
1
View file @
fe921bc6
...
@@ -92,56 +92,67 @@ class (Eq (Argument a), Show (Argument a)) => WireFormat a where
...
@@ -92,56 +92,67 @@ class (Eq (Argument a), Show (Argument a)) => WireFormat a where
type
Argument
a
type
Argument
a
putArgument
::
Argument
a
->
PutM
()
putArgument
::
Argument
a
->
PutM
()
getArgument
::
Get
(
Argument
a
)
getArgument
::
Get
(
Argument
a
)
showArgument
::
Argument
a
->
String
instance
WireFormat
'IntArgument
where
instance
WireFormat
'IntArgument
where
type
Argument
'IntArgument
=
Int32
type
Argument
'IntArgument
=
Int32
putArgument
=
putInt32host
putArgument
=
putInt32host
getArgument
=
getInt32host
getArgument
=
getInt32host
showArgument
=
show
instance
WireFormat
'UIntArgument
where
instance
WireFormat
'UIntArgument
where
type
Argument
'UIntArgument
=
Word32
type
Argument
'UIntArgument
=
Word32
putArgument
=
putWord32host
putArgument
=
putWord32host
getArgument
=
getWord32host
getArgument
=
getWord32host
showArgument
=
show
instance
WireFormat
'FixedArgument
where
instance
WireFormat
'FixedArgument
where
type
Argument
'FixedArgument
=
Fixed
type
Argument
'FixedArgument
=
Fixed
putArgument
(
Fixed
repr
)
=
putWord32host
repr
putArgument
(
Fixed
repr
)
=
putWord32host
repr
getArgument
=
Fixed
<$>
getWord32host
getArgument
=
Fixed
<$>
getWord32host
showArgument
=
show
instance
WireFormat
'StringArgument
where
instance
WireFormat
'StringArgument
where
type
Argument
'StringArgument
=
BS
.
ByteString
type
Argument
'StringArgument
=
BS
.
ByteString
putArgument
=
putWaylandBlob
putArgument
=
putWaylandBlob
getArgument
=
getWaylandBlob
getArgument
=
getWaylandBlob
showArgument
=
show
instance
WireFormat
'ArrayArgument
where
instance
WireFormat
'ArrayArgument
where
type
Argument
'ArrayArgument
=
BS
.
ByteString
type
Argument
'ArrayArgument
=
BS
.
ByteString
putArgument
=
putWaylandBlob
putArgument
=
putWaylandBlob
getArgument
=
getWaylandBlob
getArgument
=
getWaylandBlob
showArgument
array
=
"[array "
<>
show
(
BS
.
length
array
)
<>
"B]"
instance
WireFormat
'ObjectArgument
where
instance
WireFormat
'ObjectArgument
where
type
Argument
'ObjectArgument
=
ObjectId
type
Argument
'ObjectArgument
=
ObjectId
putArgument
=
putWord32host
putArgument
=
putWord32host
getArgument
=
getWord32host
getArgument
=
getWord32host
showArgument
oId
=
"@"
<>
show
oId
instance
WireFormat
'UnknownObjectArgument
where
instance
WireFormat
'UnknownObjectArgument
where
type
Argument
'UnknownObjectArgument
=
ObjectId
type
Argument
'UnknownObjectArgument
=
ObjectId
putArgument
=
putWord32host
putArgument
=
putWord32host
getArgument
=
getWord32host
getArgument
=
getWord32host
showArgument
oId
=
"@"
<>
show
oId
instance
WireFormat
'NewIdArgument
where
instance
WireFormat
'NewIdArgument
where
type
Argument
'NewIdArgument
=
NewId
type
Argument
'NewIdArgument
=
NewId
putArgument
(
NewId
newId
)
=
putWord32host
newId
putArgument
(
NewId
newId
)
=
putWord32host
newId
getArgument
=
NewId
<$>
getWord32host
getArgument
=
NewId
<$>
getWord32host
showArgument
newId
=
"new @"
<>
show
newId
instance
WireFormat
'UnknownNewIdArgument
where
instance
WireFormat
'UnknownNewIdArgument
where
type
Argument
'UnknownNewIdArgument
=
NewId
type
Argument
'UnknownNewIdArgument
=
NewId
putArgument
(
NewId
newId
)
=
putWord32host
newId
putArgument
(
NewId
newId
)
=
putWord32host
newId
getArgument
=
NewId
<$>
getWord32host
getArgument
=
NewId
<$>
getWord32host
showArgument
newId
=
"new @"
<>
show
newId
instance
WireFormat
'FdArgument
where
instance
WireFormat
'FdArgument
where
type
Argument
'FdArgument
=
Void
type
Argument
'FdArgument
=
Void
putArgument
=
undefined
putArgument
=
undefined
getArgument
=
undefined
getArgument
=
undefined
showArgument
=
undefined
-- | A wayland interface
-- | A wayland interface
...
@@ -269,7 +280,6 @@ putDynamicArgument (DynamicNewIdArgument x) = putWord32host x
...
@@ -269,7 +280,6 @@ putDynamicArgument (DynamicNewIdArgument x) = putWord32host x
putDynamicArgument
_
=
undefined
putDynamicArgument
_
=
undefined
type
ClientProtocolState
m
=
ProtocolState
'Client
m
type
ClientProtocolState
m
=
ProtocolState
'Client
m
type
ServerProtocolState
m
=
ProtocolState
'Server
m
type
ServerProtocolState
m
=
ProtocolState
'Server
m
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment