Recently I've started a C++ project in order to skill myself with GTK functions. I've used C++ approach 'cause i always programmed in java, so it seems to me much familiar.
Now, GTK libraries are written in C code, so i achieved some mix between classes and C codestyle. One of my issues is that GTK events works with callback functions. To encapsulate those event in classes I made use of static methods.
The big deal is that static methods and static variables are not visible from inside the class, plus I've written some other static functions, declared only in the .cpp file of the class, called from inside the callbacks but completely separated from the class.
It seems to me this approach is a bit clumsy, so I wonder is there any best approach in order to handle those callbacks in classes and allow them to interact with class methods and structures in an elegant way?
Thanks!