This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <xcb/xcb.h> | |
#include <xcb/bigreq.h> | |
#define explicit c_explicit | |
#include <xcb/xkb.h> | |
int main() { | |
xcb_connection_t *c = xcb_connect(":1", nullptr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <xcb/xcb.h> | |
#include <xcb/randr.h> | |
#include <cstring> | |
class main { | |
public: | |
main(); | |
xcb_connection_t* conn{}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <assert.h> | |
#define startsWith(a, b) (strstr(a, b) == a) | |
int main() { | |
char chunk[512]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This code is based on | |
* https://github.com/NilsBrause/waylandpp/blob/4321ed5c7b4bffa41b8a2a13dc7f3ece1191f4f3/scanner/scanner.cpp | |
* and should generate code identical to wayland-scanner++ | |
* | |
* It is created to be used as gradle task in Android Studio builds where we can not use generators | |
* (crosscompilation does not allow us build code for host). | |
*/ | |
import org.xml.sax.SAXException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright © 2008-2011 Kristian Høgsberg | |
* Copyright © 2011 Intel Corporation | |
* Copyright © 2015 Red Hat, Inc. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <math.h> | |
#include <sys/ipc.h> | |
#include <sys/shm.h> | |
#include <X11/Xlib.h> | |
#include <X11/extensions/XShm.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/ioctl.h> | |
#include <linux/fb.h> | |
#include <time.h> | |
int main(int argc, char *argv[]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/ioctl.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <termios.h> | |
enum { | |
KEYSTATE_NONE = 1024, | |
KEYSTATE_ESCAPE, | |
KEYSTATE_CONTROL, | |
KEYSTATE_MOUSE_PROPS |