Steward
分享是一種喜悅、更是一種幸福
掌機 - GKD Pixel 2 - Wayland Client (xdg-shell) - Connect Server
參考資訊:
https://jan.newmarch.name/Wayland/index.html
https://wayland.freedesktop.org/docs/html/apa.html
https://bugaevc.gitbooks.io/writing-wayland-clients/content/
main.c
#include <stdio.h>
#include <wayland-client.h>
int main(int argc, char **argv)
{
struct wl_display *dis = wl_display_connect(NULL);
if (dis == NULL) {
printf("failed to connect !\n");
return -1;
}
printf("connected !\n");
wl_display_disconnect(dis);
return 0;
}
編譯
$ arm-linux-gnueabihf-gcc main.c -o test -I/opt/mini/include -lwayland-client
執行
# ./test
connected !