struct tw_appsurf

Overview

Abstract wl_surface container. More…

#include <ui.h>

struct tw_appsurf
{
    // fields

    enum tw_appsurf_type type;
    uint32_t flags;
    struct tw_bbox allocation;
    struct tw_bbox pending_allocation;
    app_mime known_mimes;
    struct tw_globals* tw_globals;
    struct wl_output* wl_output;
    struct wl_surface* wl_surface;
    bool need_animation;
    uint32_t last_serial;
    struct tw_shm_pool* pool;
    struct wl_buffer* wl_buffer[2];
    bool dirty[2];
    bool committed[2];
    EGLContext eglcontext;
    EGLDisplay egldisplay;
    struct wl_egl_window* eglwin;
    EGLSurface eglsurface;
    struct tw_appsurf* parent;
    struct wl_list filter_head;
    frame_t do_frame;
    void(* destroy)(struct tw_appsurf *);
    void* user_data;
};

Detailed Documentation

Abstract wl_surface container.

/brief Abstract wl_surface container

The design goal of the surface is to use tw_appsurf as general wl_surface handler to take care the tedious work and also provides necessary flexibilities. When one backend implements tw_appsurf, usually user has very little to do.

By default tw_appsurf runs in passive mode which it only runs on events, default action is the frame callback (if you do not have any grab) and backends usually take care of the frame callback. Users can intercept those events by providing custom grabs(in rare cases).

Fields

struct tw_appsurf* parent

the parent pointer, means you will have to call the parent->frame function to do the work