native: add and use callback type