| Top |
| void | ctk_plug_construct () |
| void | ctk_plug_construct_for_display () |
| CtkWidget * | ctk_plug_new () |
| CtkWidget * | ctk_plug_new_for_display () |
| Window | ctk_plug_get_id () |
| gboolean | ctk_plug_get_embedded () |
| CdkWindow * | ctk_plug_get_socket_window () |
GObject
╰── GInitiallyUnowned
╰── CtkWidget
╰── CtkContainer
╰── CtkBin
╰── CtkWindow
╰── CtkPlug
Together with CtkSocket, CtkPlug provides the ability to embed widgets from one process into another process in a fashion that is transparent to the user. One process creates a CtkSocket widget and passes the ID of that widget’s window to the other process, which then creates a CtkPlug with that window ID. Any widgets contained in the CtkPlug then will appear inside the first application’s window.
The communication between a CtkSocket and a CtkPlug 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 CTK+ or vice versa.
The CtkPlug and CtkSocket widgets are only available when CTK+
is compiled for the X11 platform and CDK_WINDOWING_X11 is defined.
They can only be used on a CdkX11Display. To use CtkPlug and
CtkSocket, you need to include the ctk/ctkx.h header.
void ctk_plug_construct (CtkPlug *plug,Window socket_id);
Finish the initialization of plug
for a given CtkSocket identified by
socket_id
. This function will generally only be used by classes deriving from CtkPlug.
void ctk_plug_construct_for_display (CtkPlug *plug,CdkDisplay *display,Window socket_id);
Finish the initialization of plug
for a given CtkSocket identified by
socket_id
which is currently displayed on display
.
This function will generally only be used by classes deriving from CtkPlug.
plug |
a CtkPlug. |
|
display |
the CdkDisplay associated with |
|
socket_id |
the XID of the socket’s window. |
Since: 2.2
CtkWidget *
ctk_plug_new (Window socket_id);
Creates a new plug widget inside the CtkSocket identified
by socket_id
. If socket_id
is 0, the plug is left “unplugged” and
can later be plugged into a CtkSocket by ctk_socket_add_id().
CtkWidget * ctk_plug_new_for_display (CdkDisplay *display,Window socket_id);
Create a new plug widget inside the CtkSocket identified by socket_id.
display |
the CdkDisplay on which |
|
socket_id |
the XID of the socket’s window. |
Since: 2.2
Window
ctk_plug_get_id (CtkPlug *plug);
Gets the window ID of a CtkPlug widget, which can then
be used to embed this window inside another window, for
instance with ctk_socket_add_id().
gboolean
ctk_plug_get_embedded (CtkPlug *plug);
Determines whether the plug is embedded in a socket.
Since: 2.14
“embedded” property “embedded” gboolean
TRUE if the plug is embedded in a socket.
Owner: CtkPlug
Flags: Read
Default value: FALSE
Since: 2.12
“socket-window” property“socket-window” CdkWindow *
The window of the socket the plug is embedded in.
Owner: CtkPlug
Flags: Read
Since: 2.14
“embedded” signalvoid user_function (CtkPlug *plug, gpointer user_data)
Gets emitted when the plug becomes embedded in a socket.
plug |
the object on which the signal was emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last