Ignore:
Timestamp:
07/30/15 14:43:02 (10 years ago)
Author:
epyon
Message:
  • fixed offset_of
  • types.hh support unioned fields
  • io_event io_event struct type loading added
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/io_event.cc

    r447 r450  
    141141                .field( "param2",   &system_event::param2 );
    142142
    143         // TODO: io_event
     143        db->create_type<io_event>()
     144                .field( "type", &io_event::type )
     145                .union_field( "key",     &io_event::key,    "type", EV_KEY )
     146                .union_field( "mbutton", &io_event::mbutton,"type", EV_MOUSE_BUTTON )
     147                .union_field( "mmove",   &io_event::mmove,  "type", EV_MOUSE_MOVE )
     148                .union_field( "mwheel",  &io_event::mwheel, "type", EV_MOUSE_WHEEL )
     149                .union_field( "pbutton", &io_event::pbutton,"type", EV_PAD_BUTTON )
     150                .union_field( "paxis",   &io_event::paxis,  "type", EV_PAD_AXIS )
     151                .union_field( "jbutton", &io_event::jbutton,"type", EV_JOY_BUTTON )
     152                .union_field( "jaxis",   &io_event::jaxis,  "type", EV_JOY_AXIS )
     153                .union_field( "jhat",    &io_event::jhat,   "type", EV_JOY_HAT )
     154                .union_field( "jball",   &io_event::jball,  "type", EV_JOY_BALL )
     155                .union_field( "resize",  &io_event::resize, "type", EV_ACTIVE )
     156                .union_field( "active",  &io_event::active, "type", EV_RESIZE )
     157                .union_field( "system",  &io_event::system, "type", EV_SYSTEM );
     158
    144159}
Note: See TracChangeset for help on using the changeset viewer.