// Creating a wayland server intmain(int argc, char* argv[]){ // Get the display of the server structwl_display *display = wl_display_create(); if(!display){ fprintf(stderr, "Unable to create a Wayland display\n"); return1; }
// Create a socket to connect with it constchar *socket = wl_display_add_socket_auto(display); if(!socket){ fprintf(stderr, "Unable to add socket to Wayland display\n"); return1; }
// Get event loop structwl_event_loop *event = wl_display_get_event_loop(display);
// Run wayland server fprintf(stderr, "Running Wayland display on %s\n", socket); wl_display_run(display);