window in window(SDL and GTK)

In short, what I want to do is to add a window in a window.
I heart that SDL could only print screen in a gtkwindow if I use GTK, am I right?
Is anybody know the details of implementation, or where could I get it.
I didn't find it in SDL's documentation.
At the same time, if I want to get an media player interface composed  of two parts: the video output and 
control part in one widget.
And, if the video output is implemented by SDL, I need to have a gtkwindow in the parent window.
I searched and found that it is suggent "embedding a GtkWindow of type GTK_WINDOW_POPUP "inside" the 
GtkWindow of type GTK_WINDOW_TOPLEVEL"
But I am not sure how to implement it.
I write the code like
GtkWidget *window,*SDL_window; 
window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ...... 
//window has been initializedbox1 = gtk_vbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (window), box1); 
SDL_window = gtk_window_new(GTK_WINDOW_POPUP); gtk_container_add (GTK_CONTAINER (box1), SDL_window); 
The code could be compiled, but when the program run, it told me
(demo_box:7930): Gtk-WARNING **: Can't set a parent on a toplevel widget 
How could I make SDL_window a  child widget.
Thanks a lot!
Windows Live Safety Center 为您的计算机提供免费的安全扫描服务。

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]