#pragma once #if defined (__cplusplus) extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include typedef struct modeset_buf { uint32_t width; uint32_t height; uint32_t stride; uint32_t size; uint32_t handle; uint8_t *map; uint32_t fb; } modeset_buf; typedef struct modeset_dev { struct modeset_dev *next; unsigned int front_buf; struct modeset_buf bufs[2]; drmModeModeInfo mode; uint32_t conn; uint32_t crtc; drmModeCrtc *saved_crtc; } modeset_dev; modeset_dev* modeset_create(int fd); void modeset_swapbuffer(int fd, modeset_dev* dev, unsigned index); void modeset_destroy(int fd, modeset_dev* dev); #if defined (__cplusplus) } #endif