Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
(load "@lib/gcc.l")
|
||||
|
||||
(gcc "x11" '("-lX11") 'xOpenDisplay 'xCloseDisplay)
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
any xOpenDisplay(any ex) {
|
||||
any x = evSym(cdr(ex)); // Get display name
|
||||
char display[bufSize(x)]; // Create a buffer for the name
|
||||
|
||||
bufString(x, display); // Upack the name
|
||||
return boxCnt((long)XOpenDisplay(display));
|
||||
}
|
||||
|
||||
any xCloseDisplay(any ex) {
|
||||
return boxCnt(XCloseDisplay((Display*)evCnt(ex, cdr(ex))));
|
||||
}
|
||||
/**/
|
||||
|
||||
# With that we can open and close the display:
|
||||
: (setq Display (xOpenDisplay ":0.7")) # Wrong
|
||||
-> 0
|
||||
: (setq Display (xOpenDisplay ":0.0")) # Correct
|
||||
-> 158094320
|
||||
: (xCloseDisplay Display)
|
||||
-> 0
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
: (setq Display (native "/usr/lib/libX11.so.6" "XOpenDisplay" 'N ":0.0"))
|
||||
-> 6502688
|
||||
: (native "/usr/lib/libX11.so.6" "XCloseDisplay" 'I Display)
|
||||
-> 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue