/*
  area.h - Header for area data type.
*/

/* ---------- Data structures ---------- */
struct area;
struct area_ops {
    void (*open)(struct area *, struct wind *);
    void (*term)(struct area *);
    int (*mouse)(struct area *, XButtonEvent *);
    int (*draw)(struct area *, XExposeEvent *);
    int (*resize)(struct area *, XConfigureEvent *);
    int (*key)(struct area *, XKeyEvent *);
    int (*activate)(struct area *, XMapEvent *);
    int (*deactivate)(struct area *, XUnmapEvent *);
};

struct aop {
    int x;
    int y;
    int width;
    int height;
    GC gc;
    struct wind *owner;
};

struct area {
    int type;
    XRectangle bounds;
    struct wind *owner;
    GC gc;
    struct area_ops *aops;
    void *data;
};

