#include #include #include typedef struct BackingStore BackingStore; typedef struct BackingStoreEvent BackingStoreEvent; typedef enum { BACKING_STORE_NONE, BACKING_STORE_BUTTON_PRESS, BACKING_STORE_BUTTON_RELEASE, BACKING_STORE_ENTER, BACKING_STORE_LEAVE, BACKING_STORE_MOTION, } BackingStoreEventType; struct BackingStoreEvent { BackingStoreEventType type; int x; int y; int button; }; typedef void (* BackingPaintFunc) (cairo_t *cr, GdkRegion *region, gpointer data); typedef gboolean (* BackingStoreEventFunc) (BackingStore *store, BackingStoreEvent *event, gpointer *data); BackingStore *backing_store_new (GdkWindow *window, int width, int height); void backing_store_free (BackingStore *store); void backing_store_draw (BackingStore *store, GdkDrawable *dest, GdkRegion *clip, int dest_x, int dest_y); void backing_store_move_area (BackingStore *store, int x, int y, int width, int height, int dx, int dy); void backing_store_scroll (BackingStore *store, int dx, int dy); void backing_store_invalidate_rect (BackingStore *store, GdkRectangle *rect); void backing_store_invalidate_region (BackingStore *store, GdkRegion *region); void backing_store_invalidate_all (BackingStore *store); void backing_store_resize (BackingStore *store, int width, int height); void backing_store_process_updates (BackingStore *store, BackingPaintFunc func, gpointer data); /* Input */ void backing_store_process_event (BackingStore *store, GdkEvent *event); void backing_store_add_input (BackingStore *store, cairo_t *cr, gboolean is_stroke, BackingStoreEventFunc func, gpointer data);