gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Plug

Contents

Description

Together with Socket, 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 a Socket widget and passes the ID of that widget’s window to the other process, which then creates a Plug with that window ID. Any widgets contained in the Plug then will appear inside the first application’s window.

The communication between a Socket and a 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 Plug and 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 use Plug and Socket, you need to include the gtk/gtkx.h header.

Synopsis

Exported types

newtype Plug Source #

Constructors

Plug (ManagedPtr Plug) 

Instances

toPlug :: IsPlug o => o -> IO Plug Source #

Methods

construct

data PlugConstructMethodInfo Source #

Instances

((~) * signature (CULong -> m ()), MonadIO m, IsPlug a) => MethodInfo * PlugConstructMethodInfo a signature Source # 

plugConstruct Source #

Arguments

:: (HasCallStack, MonadIO m, IsPlug a) 
=> a

plug: a Plug.

-> CULong

socketId: the XID of the socket’s window.

-> m () 

Finish the initialization of plug for a given Socket identified by socketId. This function will generally only be used by classes deriving from Plug.

constructForDisplay

plugConstructForDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsPlug a, IsDisplay b) 
=> a

plug: a Plug.

-> b

display: the Display associated with socketId’s Socket.

-> CULong

socketId: the XID of the socket’s window.

-> m () 

Finish the initialization of plug for a given Socket identified by socketId which is currently displayed on display. This function will generally only be used by classes deriving from Plug.

Since: 2.2

getEmbedded

data PlugGetEmbeddedMethodInfo Source #

Instances

((~) * signature (m Bool), MonadIO m, IsPlug a) => MethodInfo * PlugGetEmbeddedMethodInfo a signature Source # 

plugGetEmbedded Source #

Arguments

:: (HasCallStack, MonadIO m, IsPlug a) 
=> a

plug: a Plug

-> m Bool

Returns: True if the plug is embedded in a socket

Determines whether the plug is embedded in a socket.

Since: 2.14

getId

data PlugGetIdMethodInfo Source #

Instances

((~) * signature (m CULong), MonadIO m, IsPlug a) => MethodInfo * PlugGetIdMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy PlugGetIdMethodInfo a -> signature -> s #

plugGetId Source #

Arguments

:: (HasCallStack, MonadIO m, IsPlug a) 
=> a

plug: a Plug.

-> m CULong

Returns: the window ID for the plug

Gets the window ID of a Plug widget, which can then be used to embed this window inside another window, for instance with socketAddId.

getSocketWindow

plugGetSocketWindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsPlug a) 
=> a

plug: a Plug

-> m (Maybe Window)

Returns: the window of the socket, or Nothing

Retrieves the socket the plug is embedded in.

Since: 2.14

new

plugNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CULong

socketId: the window ID of the socket, or 0.

-> m Plug

Returns: the new Plug widget.

Creates a new plug widget inside the Socket identified by socketId. If socketId is 0, the plug is left “unplugged” and can later be plugged into a Socket by socketAddId.

newForDisplay

plugNewForDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) 
=> a

display: the Display on which socketId is displayed

-> CULong

socketId: the XID of the socket’s window.

-> m Plug

Returns: the new Plug widget.

Create a new plug widget inside the Socket identified by socket_id.

Since: 2.2

Properties

embedded

data PlugEmbeddedPropertyInfo Source #

Instances

AttrInfo PlugEmbeddedPropertyInfo Source # 
type AttrOrigin PlugEmbeddedPropertyInfo Source # 
type AttrLabel PlugEmbeddedPropertyInfo Source # 
type AttrGetType PlugEmbeddedPropertyInfo Source # 
type AttrBaseTypeConstraint PlugEmbeddedPropertyInfo Source # 
type AttrSetTypeConstraint PlugEmbeddedPropertyInfo Source # 
type AttrAllowedOps PlugEmbeddedPropertyInfo Source # 

socketWindow

data PlugSocketWindowPropertyInfo Source #

Instances

AttrInfo PlugSocketWindowPropertyInfo Source # 
type AttrOrigin PlugSocketWindowPropertyInfo Source # 
type AttrLabel PlugSocketWindowPropertyInfo Source # 
type AttrGetType PlugSocketWindowPropertyInfo Source # 
type AttrBaseTypeConstraint PlugSocketWindowPropertyInfo Source # 
type AttrSetTypeConstraint PlugSocketWindowPropertyInfo Source # 
type AttrAllowedOps PlugSocketWindowPropertyInfo Source # 

Signals

embedded

type C_PlugEmbeddedCallback = Ptr () -> Ptr () -> IO () Source #