Fixed XClientMessageEvent struct, added equals operator fot TAtom from unsigned, added xclient union field access proc to XEvent
This commit is contained in:
parent
127253c8d5
commit
f74e296f84
2 changed files with 11 additions and 2 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
# x.h
|
# x.h
|
||||||
#
|
#
|
||||||
# Pointers to basic pascal types, inserted by h2pas conversion program.
|
# Pointers to basic pascal types, inserted by h2pas conversion program.
|
||||||
|
import unsigned
|
||||||
|
|
||||||
const
|
const
|
||||||
X_PROTOCOL* = 11
|
X_PROTOCOL* = 11
|
||||||
|
|
@ -47,7 +48,8 @@ type
|
||||||
PKeyCode* = ptr TKeyCode
|
PKeyCode* = ptr TKeyCode
|
||||||
TKeyCode* = cuchar
|
TKeyCode* = cuchar
|
||||||
|
|
||||||
proc `==`*(a, b: TAtom): bool {.borrow.}
|
proc `==`*(a, b: TAtom): bool =
|
||||||
|
return unsigned.`==`(a,b)
|
||||||
|
|
||||||
const
|
const
|
||||||
None* = 0
|
None* = 0
|
||||||
|
|
|
||||||
|
|
@ -694,7 +694,7 @@ type
|
||||||
window*: TWindow
|
window*: TWindow
|
||||||
message_type*: TAtom
|
message_type*: TAtom
|
||||||
format*: cint
|
format*: cint
|
||||||
data*: array[0..19, char]
|
data*: array[0..4, clong]
|
||||||
|
|
||||||
PXMappingEvent* = ptr TXMappingEvent
|
PXMappingEvent* = ptr TXMappingEvent
|
||||||
TXMappingEvent*{.final.} = object
|
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
|
type
|
||||||
PXCharStruct* = ptr TXCharStruct
|
PXCharStruct* = ptr TXCharStruct
|
||||||
TXCharStruct*{.final.} = object
|
TXCharStruct*{.final.} = object
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue