struct tw_globalsΒΆ

global context for one application (can be shared with multiple surface)

It contains almost everything and app_surface should have a reference of this.

This struct is indeed rather big (currently 488 bytes), we would want to fit in L1 Cache

#include <client.h>

struct tw_globals
    // structs

    struct wl_inputs;

    // fields

    struct wl_compositor* compositor;
    struct wl_display* display;
    struct wl_shm* shm;
    struct wl_data_device_manager* wl_data_device_manager;
    enum wl_shm_format buffer_format;
    struct tw_globals::wl_inputs inputs;
    const struct tw_theme* theme;
    struct tw_event_queue event_queue;