*Strong Bad shakes his leg while asking this*
This commit is contained in:
parent
81227fc332
commit
9074f619b2
2 changed files with 11 additions and 1 deletions
|
@ -18,7 +18,7 @@ $(EXAMPLES): %: %.c $(STATIC)
|
||||||
$(CC) $(CFLAGS) $< -o $@ $(STATIC)
|
$(CC) $(CFLAGS) $< -o $@ $(STATIC)
|
||||||
|
|
||||||
cluster: cluster.c $(STATIC)
|
cluster: cluster.c $(STATIC)
|
||||||
$(CC) $(CFLAGS) $< -o $@ $(STATIC) $(shell pkg-config --cflags --libs cairo x11) -lm
|
$(CC) $(CFLAGS) $< -o $@ $(STATIC) $(shell pkg-config --cflags --libs cairo x11) -lXext -lm
|
||||||
|
|
||||||
view: view.c $(STATIC)
|
view: view.c $(STATIC)
|
||||||
$(CC) $(CFLAGS) $< -o $@ $(STATIC) -lncurses
|
$(CC) $(CFLAGS) $< -o $@ $(STATIC) -lncurses
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/extensions/Xdbe.h>
|
||||||
|
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
#include <cairo-xlib.h>
|
#include <cairo-xlib.h>
|
||||||
|
|
||||||
|
@ -228,6 +230,7 @@ int main(int argc, char **argv) {
|
||||||
Display *display;
|
Display *display;
|
||||||
Window win;
|
Window win;
|
||||||
Pixmap bg;
|
Pixmap bg;
|
||||||
|
XdbeBackBuffer buf;
|
||||||
GC gc;
|
GC gc;
|
||||||
fd_set rfds, rready;
|
fd_set rfds, rready;
|
||||||
|
|
||||||
|
@ -237,6 +240,8 @@ int main(int argc, char **argv) {
|
||||||
width = 1024,
|
width = 1024,
|
||||||
height = 480;
|
height = 480;
|
||||||
|
|
||||||
|
int major, minor;
|
||||||
|
|
||||||
XGCValues values = {
|
XGCValues values = {
|
||||||
.foreground = 0x000000,
|
.foreground = 0x000000,
|
||||||
.background = 0xffffff,
|
.background = 0xffffff,
|
||||||
|
@ -252,6 +257,11 @@ int main(int argc, char **argv) {
|
||||||
if ((display = XOpenDisplay(NULL)) == NULL)
|
if ((display = XOpenDisplay(NULL)) == NULL)
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
|
if (XdbeQueryExtension(display, &major, &minor))
|
||||||
|
printf("Xdbe %d.%d supported\n", major, minor);
|
||||||
|
else
|
||||||
|
exit(1);
|
||||||
|
|
||||||
fd = hexagram_can_if_fd(can_if);
|
fd = hexagram_can_if_fd(can_if);
|
||||||
fd2 = ConnectionNumber(display);
|
fd2 = ConnectionNumber(display);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue