How do I get the gdk window for a gtk window in C?

纵饮孤独 提交于 2019-11-30 22:51:56

问题


I'm trying to set the cursor to a watch. The problem is that gdk_set_cursor() requires a gdk_window. How do I get the gdk_window of a gtk_window in C? I've seen examples for gtkmm and pygtk but I can't find the corresponding C function.


回答1:


GdkWindow *gdk_window = gtk_widget_get_window(GTK_WIDGET(gtk_window));

or, pre GTK 2.14, but now disallowed:

GdkWindow *gdk_window = gtk_window->window;


来源:https://stackoverflow.com/questions/10264625/how-do-i-get-the-gdk-window-for-a-gtk-window-in-c

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