Gtk2HsContentsIndex
Graphics.UI.Gtk.Embedding.Socket
Description

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

  • 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.
Synopsis
data Socket
class ContainerClass o => SocketClass o
castToSocket :: GObjectClass obj => obj -> Socket
type NativeWindowId = Word32
socketNew :: IO Socket
socketHasPlug :: SocketClass s => s -> IO Bool
socketAddId :: SocketClass s => s -> NativeWindowId -> IO ()
socketGetId :: SocketClass s => s -> IO NativeWindowId
onPlugAdded :: SocketClass s => s -> IO () -> IO (ConnectId s)
afterPlugAdded :: SocketClass s => s -> IO () -> IO (ConnectId s)
onPlugRemoved :: SocketClass s => s -> IO () -> IO (ConnectId s)
afterPlugRemoved :: SocketClass s => s -> IO () -> IO (ConnectId s)
Documentation
data Socket
Instances
SocketClass Socket
ContainerClass Socket
WidgetClass Socket
ObjectClass Socket
GObjectClass Socket
class ContainerClass o => SocketClass o
Instances
SocketClass Socket
castToSocket :: GObjectClass obj => obj -> Socket
type NativeWindowId = Word32
The identifer of a window to be embedded.
socketNew :: IO Socket

Create a Container for embedding.

  • 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.
socketHasPlug :: SocketClass s => s -> IO Bool
Test if a Plug is connected to the socket.
socketAddId :: SocketClass s => s -> NativeWindowId -> IO ()

Insert another application into this socket.

  • 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 :: SocketClass s => s -> IO NativeWindowId

Prepare to insert this application into another.

onPlugAdded :: SocketClass s => s -> IO () -> IO (ConnectId s)
This socket was added into another application.
afterPlugAdded :: SocketClass s => s -> IO () -> IO (ConnectId s)
onPlugRemoved :: SocketClass s => s -> IO () -> IO (ConnectId s)
This socket was removed from another application.
afterPlugRemoved :: SocketClass s => s -> IO () -> IO (ConnectId s)
Produced by Haddock version 0.6