Re: gtk embedding.
Bruce Sherwood <[email protected]> Fri, 29 Jun 2012 10:16:18 -0600
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <CAFDG03ghjV1TeQxrM=52OS9+fF7baepQ-FJNHx7Mt0Vo_SgRCw@mail.gmail.com> |
I don't really follow the details of this, but it doesn't sound like a good candidate for the standard version of VPython because it is apparently GTK-specific, and VPython attempts to be platform-independent. I'm currently studying how it might be possible to base VPython on wxPython, in which case the OpenGL canvas could be part of a window, with cross-platform support for menus etc. My immediate concern is, as I've commented before, to be able to run VPython on a 64-bit Python on the Mac, based on Cocoa. On the wxpython-users list, wxPython experts have been very helpful in my quest, including making a suggestion on how to get around the very serious problem that the Cocoa interact loop must be in the primary thread, the roadblock that David Scherer and I were unable to get around when we tried in 2008. Bruce Sherwood On Fri, Jun 29, 2012 at 9:43 AM, Yann Golanski <[email protected]> wrote: > A bug has risen from the embedding code I send earlier. The code works > fine under the fvwm2 window manager but not under Gnome. It appears > that Gnome is more picky with GTK. This result in any embedding command > destroying the VPythong window instead of embedding it. > > Basically, to embed a GTK window into another one, you need to have a > pair of Gtk::Plug and Gtk::Socket. The child process (VPython in this > case) creates a plug and exposes the plug ID. The programme that > will embed VPython uses this plug ID as a parameter to its Gtk::Socket > and thus can embed the plug. > > So, would it be possible to have a gtk::Plug() object within main_gui() > and a method that would return the Plug ID? Ideally, this would be > wrapped within a Python call so that I could do something akin to: > > display.get_selected() > plug_id = display.get_gtk_plug_id() > > Would it be okay if this became a feature request? > > -- > GPG Fingerprint 8666 7F9A 17E7 AC8E CC36 1D1E C707 D658 6685 2528 > The views expressed in this e-mail may or may not reflect those of the > author and do not necessarily reflect those of Isotek Oil and Gas Ltd. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Visualpython-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/visualpython-users > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Visualpython-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/visualpython-users