I took the code Hello World In GTK from this link. There it uses a number of callback functions but for each callback function say
static void hello( GtkWidget *widget,gpointer data )
When It uses it as a callback it does
g_signal_connect (button, "clicked",G_CALLBACK (hello), NULL);
But here, it does not pass any arguments to hello() function. If I try to do this in a normal function, i.e.
#include <stdio.h>
int hello(int a) {
printf("hello");
}
void main() {
int j=10;
hello;
}
it does not give me any error and no output too.
Q1. Howcome callback functions ignore the arguments?
Q2. How to make a function callback? i.e. in my second hello
example, will the function hello be callback?