Using an X11 Window with GTK

半世苍凉 提交于 2021-02-10 06:31:11

问题


My C application uses X11 calls to create and manage a window. I only want to use GTK3 for menus.

I create a window using Window wnd = XCreateWindow(...);

Now I want to use GTK to add menus to wnd.

GTK APIs such as gtk_container_add(GTK_CONTAINER(gtk_wnd), vbox) want a GtkWindow, which I do not have.

How do I accomplish this?

Ideally I'd like to get a X11 handle to work with GTK, potentially via a conversion. Alternatively, I'd also settle for getting the current window via some GTK API.

来源:https://stackoverflow.com/questions/45895979/using-an-x11-window-with-gtk

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