#ifndef PIXMAP_IMPL_H_INCLUDED #define PIXMAP_IMPL_H_INCLUDED #include #include "pixmap.h" struct pixmap_vtable { void (*clear)(struct pixmap * this); void (*set_pixel)(struct pixmap * this, unsigned int x, unsigned int y, int v); int (*get_pixel)(const struct pixmap * this, unsigned int x, unsigned int y); unsigned int (*get_width)(const struct pixmap * this); unsigned int (*get_height)(const struct pixmap * this); size_t (*get_memory_size)(const struct pixmap * this); void (*destroy)(struct pixmap * this); }; struct pixmap { const struct pixmap_vtable * vtable; }; #endif