tags:

views:

544

answers:

2

I'm trying to port a GTK-based Linux app to Mac OS-X. I have the GUI working OK but now I need to create a Widget which embeds MPlayer.

I should be able to use the -wid option of MPlayer to embed it in my app but I need to find the Window ID. Does anyone know how to find the window ID of a GTK Widget or Container on OS-X ?

+1  A: 

Are you using GTK with the X11 or Quartz backend? If X11, I imagine it should work just as on Linux. Otherwise I don't think you can do what you're trying to do, MPlayer wants a X11 window ID, and you're not using X11 at all.

vasi
I didn't know I had a choice. It seems to be the Quartz one. It was just the latest DMG package downloaded from gtk.org.
Adam Pierce
Well, after some research, I found MacPorts. They have versions of Gtk and MPlayer which can do this.
Adam Pierce
+1  A: 

If you're using the Quartz backend for either GTK or MPlayer, you can't do this. This window embedding technique only works under X11.

(And, if you're using X11, you're hardly writing a native OS X application!)

Thanks for the answer duskwuff. I did end up making it an X11 application and using the X11 window ID. It works OK.
Adam Pierce