开发者

How can i retrieve Window ID of gtk window

开发者 https://www.devze.com 2022-12-14 03:10 出处:网络
I am having an application where i need to display streaming video using XV. I will pass top-level window ID to underlying video playing application which will Attach/Add child window (child window w

I am having an application where i need to display streaming video using XV.

I will pass top-level window ID to underlying video playing application which will Attach/Add child window (child window with streaming 开发者_Python百科videos in it) to my window. So for that I need to get ID of top level window provided by operating system.

I am using GTK+ and C on Linux.


You use the GDK_DRAWABLE_XID() macro, assuming you're on X11:

GtkWindow *mywindow;
GdkWindow *gwin;

gwin = gtk_widget_get_window(GTK_WIDGET(mywindow));
printf("the X11 id is %u\n", GDK_DRAWABLE_XID(gwin));
0

精彩评论

暂无评论...
验证码 换一张
取 消