
struct CORE.Event
    obj  dd ?
    type dd ?
ends

CORE_EVENT_PAINT = 0x00010000
CORE_EVENT_KEY   = 0x00020000
CORE_EVENT_MOUSE = 0x00030000

struct CORE.Event.Paint
    p  CORE.Event
    gc dd ?
ends

struct CORE.Event.Key
    p     CORE.Event
    key   dd ?
    char  dd ?
    scan  dd ?
ends

CORE_EVENT_KEY_DOWN = CORE_EVENT_KEY + 0x0001
CORE_EVENT_KEY_UP   = CORE_EVENT_KEY + 0x0002

struct CORE.Event.Mouse
    p      CORE.Event
    pos    CORE.Point
    bstate dd ?
ends

CORE_EVENT_MOUSE_MOVE       = CORE_EVENT_MOUSE + 0x0001
CORE_EVENT_MOUSE_LBTN_DOWN  = CORE_EVENT_MOUSE + 0x0002
CORE_EVENT_MOUSE_LBTN_UP    = CORE_EVENT_MOUSE + 0x0003
CORE_EVENT_MOUSE_RBTN_DOWN  = CORE_EVENT_MOUSE + 0x0004
CORE_EVENT_MOUSE_RBTN_UP    = CORE_EVENT_MOUSE + 0x0005
CORE_EVENT_MOUSE_MBTN_DOWN  = CORE_EVENT_MOUSE + 0x0006
CORE_EVENT_MOUSE_MBTN_UP    = CORE_EVENT_MOUSE + 0x0007
CORE_EVENT_MOUSE_WHEEL_DOWN = CORE_EVENT_MOUSE + 0x0008
CORE_EVENT_MOUSE_WHEEL_UP   = CORE_EVENT_MOUSE + 0x0009
