Re: Gtk2::Plug -- connect?



On Thursday, July 31, 2003, at 11:34  AM, Matthew Weier OPhinney wrote:

How do I connect to a GtkSocket, using gtk2-perl 0.90?

it's easier than you were making it.  :-)

either:

   1. create the Gtk2::Socket
   2. pass the output of $socket->get_id to the other process
   3. in the other process, do $plug = Gtk2::Plug->new ($socket_id)
   # this is the method used by examples/plug.pl and examples/socket.pl,
   # and explained in the description section of
   # http://developer.gnome.org/doc/API/2.0/gtk/GtkSocket.html

or

   1. create the plug with $plug = Gtk2::Plug->new (0);
   2. pass the output of $plug->get_id to the other process
3. in the other process, create a new socket and then do $socket->add_id ($plug_id) # as described by http://developer.gnome.org/doc/API/2.0/gtk/GtkSocket.html#gtk-socket- add-id

or, if you are desperate and the to-be-embedded process doesn't support XEMBED

   1. create a socket
   2. call $socket->steal ($xid)

the hard part, which is entirely up to you, is figuring out how to pass the ids from one app to another.




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