native: add and use callback type

damn!