There are two functions that can be bound by default.
The first one doesn't has a parameter and the other one has a "const tgui::Callback&" parameter.
But one of the bindCallback functions accepts a boost::function, which means you should be able to bind anything.
The following will give you a function that takes a pointer to an integer when the function is called.
You will have to use pointer because the variable itself cannot be changed after it is bound.
Note that you don't have to include boost. The function and bind parts are included with tgui. (std::bind also works)
void func(int *i)
{
std::cout << *i << std::endl; // Will print '3' when the picture is clicked
}
int *i = new int(5);
tgui::Picture::Ptr picture(window);
picture->load("Linux.jpg");
picture->bindCallback(boost::bind(func, i), tgui::Picture::LeftMouseClicked);
*i = 3;