Getting pid and cid

Hello,
Is there any way to get the pid and cid values of the touched object in the official Nextion library without specifying a callback routine for each button?

What or where is the official Nextion library?

It so easy to communicate between a Nextion and an microprocessor, why use a library? In my code, the touched button or hotspot simply sends a message to the microprocessor using a ‘print’ statement.