Help needed: How to switch an agif instance to a specified page via function

Seeking help from experts: Using the latest version of the SDK, in the example\multimedia\agif\lvgl example, pages are switched to the previous or next page via touch. If I want to switch pages through the API, how should I proceed?