GtkSocket

GtkSocket

Container for widgets from other processes.

Object Hierarchy

GtkObject
`-- GtkWidget
       `-- GtkContainer
              `-- GtkSocket

Direct subclasses

None.

Description

By creating a GtkSocket, an entirely different Gtk application may embed itself into your application.

GtkSocket has nothing to do with network sockets. You can't use it to communicate between different computers.
GtkPlug and GtkSocket don't work on the Windows operating system.

The play between GtkSocket and GtkPlug is the following:

Note that when a GtkSocket is destroyed, the plugged-in GtkPlug application will be destroyed as well.

As soon the GtkPlug unplugs from the socket, the GtkSocket can't really be used any more. One could re-realize it, but there will be errors and the socket won't be visible.

You can catch the unplugging-event by connecting to the "unrealize" signal of the socket. Note that you also will be notified if you application is being destroyed. There is no other way to do this since the plug-added and plug-removed signals exist in gtk2 only.

A use for this widget is that you could write your own editor based on vim by letting it plug into the socket provided by your app: gvim --socketid <id of your socket> Note that you need to have the gtk version of gvim for this purpose.

Constructor

GtkSocket (void);
-- Creates a new socket instance.

Methods

steal()
  Re-parents an existing window in the socket

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.