fontconfig_actor/src/protocol.nim

19 lines
510 B
Nim
Raw Normal View History

2023-03-27 03:37:38 +00:00
import
std/typetraits, preserves, std/tables
type
FontAssertion* {.preservesRecord: "fontconfig".} = object
2023-03-29 22:53:37 +00:00
`pattern`*: Properties
`attributes`*: Properties
2023-03-27 03:37:38 +00:00
2023-05-02 21:07:00 +00:00
BootArguments* {.preservesDictionary.} = object
`dataspace`* {.preservesEmbedded.}: Preserve[void]
2023-03-29 22:53:37 +00:00
Properties* = Table[Symbol, Preserve[void]]
2023-05-02 21:07:00 +00:00
proc `$`*(x: FontAssertion | BootArguments | Properties): string =
2023-03-27 03:37:38 +00:00
`$`(toPreserve(x))
2023-05-02 21:07:00 +00:00
proc encode*(x: FontAssertion | BootArguments | Properties): seq[byte] =
2023-03-27 03:37:38 +00:00
encode(toPreserve(x))