I do have some trouble for a small personal project I'm working on. I wrote kind of a "yet another image/video/archive/whatever" viewer/player and I want to extend it a little, so that it can play swf files.
For that I tried different things (no probs on Windows, as I could embed Adobes player I guess) on Linux using wxGTK. At first I thought I could use gnash, as it has some option to redirect the output to a give XID, but I couldn't get it working (tried the same with mplayer a while ago and had no problems there). Now I'm using swfdec.
The problem is that I want to have a wxPanel/wxControl as the parent window for a GtkWidget that swfdec creates and uses for output. So far I wasn't able to properly embed it. I create the widget and use it like
Code: Select all
widget = swfdec_gtk_widget_new (NULL);
gtk_container_add (GTK_CONTAINER(m_wxwindow), widget);
Now, the widget is displayed and I can set and play the files, but it doesn't react to size changes and other stuff properly. I have handler for size events and resize it manually, as well as a handler for relaying key events, but I thought this could be easier.
Has anybody ever had success in embedding a GtkWidget to a wxWindow? If yes, how? If no, why not?
I'm open for any suggestion.