Gtk lockbuttons

Dear All,
Good Morning.
I am looking for a simple example that demonstrates gtk lock buttons. I am using gtk-3.
I am mainly looking for the callback function or just a function that can change lock to unlock etc.
I have read the documentation many times and I am looking for an example in C++.
It would be great if you can pointout a link. I did google search, but was not successful yet.
Thanks.

There is a use of a GtkLockButton in gtk3-widget-factory.

There’s also tests/testlockbutton.c in the gtk repository.