Update realtime_xlib.nim

This commit is contained in:
codic12 2021-12-04 18:46:32 -08:00 committed by GitHub
parent a6c1c63e30
commit da59293417
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,10 @@
## This example show how to have real time pixie using the X11 API.
import math, pixie, x11/[x, xlib], std/os
import math, pixie, std/os
import
x11/xlib,
x11/xutil,
x11/x
let
w: int32 = 256
@ -17,7 +21,6 @@ var
graphicsContext: GC
frameCount = 0
proc render() =
## Called every frame by main while loop
@ -51,11 +54,6 @@ proc render() =
frameBuffer), w.cuint, h.cuint, 8, w*4)
discard XPutImage(display, window, graphicsContext, image, 0, 0, 0, 0, w.cuint, h.cuint)
import
x11/xlib,
x11/xutil,
x11/x
const
borderWidth = 0
eventMask = ButtonPressMask or KeyPressMask or ExposureMask