Name

Socket —

This widget provides the possibility that other application display their widgets within this application.

Synopsis

type
        NativeWindowId
socketNew:: IO Socket
socketAddId:: SocketClass s => s -> NativeWindowId -> IO ()
socketGetId:: SocketClass s => s -> IO NativeWindowId
socketHasPlug:: SocketClass s => s -> IO Bool
onPlugAdded:: SocketClass s => s -> IO () -> IO (ConnectId s)
onPlugRemoved:: SocketClass s => s -> IO () -> IO (ConnectId s)

Introduction

After creation of the Socket, you may retrieve the NativeWindow of the socket. For this to work, the socket must at least be realized (e.g. shown).

The application has to make sure the Socket is not destroyed while the other application tries to connect. If the NativeWindow was transmitted, the inviting application can check with socketHasPlug if the plug has already connected.

Datatypes

type NativeWindowId

NativeWindowIdWord32

The identifer of a window to be embedded.

Constructors

socketNew

Create a Container for embedding.

socketNew

Socket is a Container for foreign applications that support the XEMBED protocol. To connect two applications the NativeWindowId has to be passed either from this socket to the other application's Plug or vice versa.

Methods

socketAddId

Insert another application into this socket.

socketAddId:: s:: NativeWindowId:: IO ()
socnwi

Inserts the other application into this plug. The NativeWindowId comes from the other application.

The Socket must have already be added into a toplevel window before you can make this call.

socketGetId

Prepare to insert this application into another.

socketGetId:: s:: IO NativeWindowId
soc

The extracted NativeWindowId can be passed to another application which can then embed this socket Container.

socketHasPlug

Test if a Plug is connected to the socket.

socketHasPlug:: s:: IO Bool
socket

Signals

onPlugAdded

This socket was added into another application.

onPlugAdded:: s:: IO ():: IO (ConnectId s)

onPlugRemoved

This socket was removed from another application.

onPlugRemoved:: s:: IO ():: IO (ConnectId s)