I have a function that is connected to the "changed" signal for a combobox in gtk, which in turn calls another function read_button_config.
The read_button_config takes the main window, a combobox and a vcontainer which I had not declared globally as parameters
Which way is better for passing these parameters: - declaring the parameters globally - passing the parameters as a struct to the first function, and passing the struct members to the read_button_config function?
Please let me know why you think either is better, I want to know what is a better way for future development
user_dataparameter to signal functions, after all.user_dataparameters? Or are you confused about something else? And are you familiar with any other GUI toolkits besides GTK+ or programming languages other than C? (This last question may help me make explaining the situation easier.)user_datais idiomatic. It's a bit harder since you have to manage the memory for theuser_datayourself, but usinguser_datakeeps your code modules more self-contained. You will need to decide what you want to do.