public MediaListEvent createEvent(libvlc_event_t event) {
// Create an event suitable for the native event type...
MediaListEvent result = null;
switch(libvlc_event_e.event(event.type)) {
case libvlc_MediaListWillAddItem:
media_list_will_add_item addItemEvent = ((media_list_will_add_item)event.u.getTypedValue(media_list_will_add_item.class));
result = new MediaListWillAddItemEvent(mediaList, addItemEvent.item, addItemEvent.index);
break;
case libvlc_MediaListItemAdded:
media_list_item_added itemAddedEvent = ((media_list_item_added)event.u.getTypedValue(media_list_item_added.class));