Gtk.Plug¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Window (119), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
class |
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Window (5), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Whether the plug is embedded |
||
r |
The window of the socket the plug is embedded in |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Short Description |
---|---|
Gets emitted when the plug becomes embedded in a socket. |
Fields¶
- Inherited:
Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Type |
Access |
Description |
---|---|---|---|
window |
r |
Class Details¶
- class Gtk.Plug(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Together with
Gtk.Socket
,Gtk.Plug
provides the ability to embed widgets from one process into another process in a fashion that is transparent to the user. One process creates aGtk.Socket
widget and passes the ID of that widget’s window to the other process, which then creates aGtk.Plug
with that window ID. Any widgets contained in theGtk.Plug
then will appear inside the first application’s window.The communication between a
Gtk.Socket
and aGtk.Plug
follows the XEmbed Protocol. This protocol has also been implemented in other toolkits, e.g. Qt, allowing the same level of integration when embedding a Qt widget in GTK+ or vice versa.The
Gtk.Plug
andGtk.Socket
widgets are only available when GTK+ is compiled for the X11 platform and %GDK_WINDOWING_X11 is defined. They can only be used on a #GdkX11Display. To useGtk.Plug
andGtk.Socket
, you need to include thegtk/gtkx.h
header.- classmethod new(socket_id)[source]¶
- Parameters:
socket_id (
int
) – the window ID of the socket, or 0.- Returns:
the new
Gtk.Plug
widget.- Return type:
Creates a new plug widget inside the
Gtk.Socket
identified by socket_id. If socket_id is 0, the plug is left “unplugged” and can later be plugged into aGtk.Socket
byGtk.Socket.add_id
().
- classmethod new_for_display(display, socket_id)[source]¶
- Parameters:
display (
Gdk.Display
) – theGdk.Display
on which socket_id is displayedsocket_id (
int
) – the XID of the socket’s window.
- Returns:
the new
Gtk.Plug
widget.- Return type:
Create a new plug widget inside the
Gtk.Socket
identified by socket_id.New in version 2.2.
- construct(socket_id)[source]¶
- Parameters:
socket_id (
int
) – the XID of the socket’s window.
Finish the initialization of self for a given
Gtk.Socket
identified by socket_id. This function will generally only be used by classes deriving fromGtk.Plug
.
- construct_for_display(display, socket_id)[source]¶
- Parameters:
display (
Gdk.Display
) – theGdk.Display
associated with socket_id’sGtk.Socket
.socket_id (
int
) – the XID of the socket’s window.
Finish the initialization of self for a given
Gtk.Socket
identified by socket_id which is currently displayed on display. This function will generally only be used by classes deriving fromGtk.Plug
.New in version 2.2.
- get_id()[source]¶
- Returns:
the window ID for the plug
- Return type:
Gets the window ID of a
Gtk.Plug
widget, which can then be used to embed this window inside another window, for instance withGtk.Socket.add_id
().
- get_socket_window()[source]¶
- Returns:
the window of the socket, or
None
- Return type:
Gdk.Window
orNone
Retrieves the socket the plug is embedded in.
New in version 2.14.
- do_embedded() virtual¶
Signal Details¶
Property Details¶
- Gtk.Plug.props.socket_window¶
- Name:
socket-window
- Type:
- Default Value:
- Flags:
The window of the socket the plug is embedded in.
New in version 2.14.