Glade3 and C programming

梦想与她 提交于 2019-12-06 13:15:23

you are passing 'NULL' for the callback functions here:

gtk_builder_connect_signals( builder, NULL );

Also remember to free memory allocated to *input1, *input2 and *result.

The prototype for the button's clicked signal is wrong. It should be (Reference):

void user_function (GtkButton *button, gpointer user_data)

Probably the best option would be to pass builder into the callback and retrieve the entry widgets from there (unref it after gtk_main) or pass a structure with both widgets.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!