Calling another function from a function using GTK
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Calling another function from a function using GTK
Hello ppl! I had a problem in my coding in C, in which whenever i try to call another function from a function, there will be an error stating that the function called is undeclared. How do i solve this?
I m using the GTK programming using C. so i hav problem in calling another function from a function with the different widgets declared in each function. wonder if there is a way to call the other functions? or there is no other way to do so?
Re: Calling another function from a function using GTK
Quote:
Originally posted by geminigal Hello ppl! I had a problem in my coding in C, in which whenever i try to call another function from a function, there will be an error stating that the function called is undeclared. How do i solve this?
No headers included? Please post a short fragment of your code to make sure.
Quote:
I m using the GTK programming using C. so i hav problem in calling another function from a function with the different widgets declared in each function. wonder if there is a way to call the other functions? or there is no other way to do so?
You mean you are in a callback for one widget and want to do something with another? Glade generates a set of macros that build widget tree. Then you can search for a widget (and its child widgets) using their names and get pointer.
how can we call this funcion from another
function
likewise
void refresh_the_subscribtions(GtkWidget *button, gpointer data)
{
//here function must be called
}
It is as a function which makes a button press simulation
additionally, I want to add that
on menu there is a button, if I clicked two bttons seperately
they are work very well
but I want to press the other button automatically
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.