Fixed XClientMessageEvent struct, added equals operator fot TAtom from unsigned, added xclient union field access proc to XEvent

This commit is contained in:
Yury Benesh 2013-07-07 23:01:11 +03:00
commit f74e296f84
2 changed files with 11 additions and 2 deletions

View file

@ -694,7 +694,7 @@ type
window*: TWindow
message_type*: TAtom
format*: cint
data*: array[0..19, char]
data*: array[0..4, clong]
PXMappingEvent* = ptr TXMappingEvent
TXMappingEvent*{.final.} = object
@ -766,6 +766,13 @@ type
#
proc xclient*(e: PXEvent): PXClientMessageEvent =
## Treats XEvent as XClientMessageEvent
return cast[PXClientMessageEvent](e)
proc xclient*(e: var TXEvent): PXClientMessageEvent =
return xclient(PXEvent(e.addr))
type
PXCharStruct* = ptr TXCharStruct
TXCharStruct*{.final.} = object