I am trying to create a structure called button ressource, that will store all the attributes of a button.
My problem is with the command function "void on select" which should be a function with unkonow number and type of parameters right now i'm using a pointer on a function that takes only one param that i've declared as one of the structure element, but i need a better way in case i need to execute a command with unkonw number and type of parameters.
struct button_ressource
{
unsigned char *image_off;
unsigned char *image_on;
unsigned int width
unsigned int h;
void (*on_select)(void *data); // the button command
int param; // this param will be passed to the on_select command
};
typedef struct button_ressource button_res;