gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Embedding.Plug

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes
- Signals

Description

Toplevel for embedding into other processes

Synopsis

- data Plug
- class WindowClass o => PlugClass o
- castToPlug :: GObjectClass obj => obj -> Plug
- gTypePlug :: GType
- toPlug :: PlugClass o => o -> Plug
- data NativeWindowId
- plugNew :: Maybe NativeWindowId -> IO Plug
- plugNewForDisplay :: Display -> Maybe NativeWindowId -> IO Plug
- plugGetId :: PlugClass self => self -> IO NativeWindowId
- plugGetEmbedded :: PlugClass self => self -> IO Bool
- plugGetSocketWindow :: PlugClass self => self -> IO (Maybe DrawWindow)
- plugAttrEmbedded :: PlugClass self => ReadAttr self Bool
- plugAttrSocketWindow :: PlugClass self => ReadAttr self (Maybe DrawWindow)
- plugEmbedded :: PlugClass self => Signal self (IO ())

# Detail

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 widgets 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 applications window.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Bin
    | +----Window
    | +----Plug

# Types

data Plug Source #

#### Instances

Instances details

Eq Plug Source # |
Instance details Defined in Graphics.UI.Gtk.Embedding.Types Methods (==) :: Plug -> Plug -> Bool Source # (/=) :: Plug -> Plug -> Bool Source #
Ord Plug Source # |
Instance details Defined in Graphics.UI.Gtk.Embedding.Types Methods compare :: Plug -> Plug -> Ordering Source # (<) :: Plug -> Plug -> Bool Source # (<=) :: Plug -> Plug -> Bool Source # (>) :: Plug -> Plug -> Bool Source # (>=) :: Plug -> Plug -> Bool Source # max :: Plug -> Plug -> Plug Source # min :: Plug -> Plug -> Plug Source #
GObjectClass Plug Source # |
Instance details Defined in Graphics.UI.Gtk.Embedding.Types Methods toGObject :: Plug -> GObject Source # unsafeCastGObject :: GObject -> Plug Source #
PlugClass Plug Source # |
Instance details Defined in Graphics.UI.Gtk.Embedding.Types
BinClass Plug Source # |
Instance details Defined in Graphics.UI.Gtk.Embedding.Types
ContainerClass Plug Source # |
Instance details Defined in Graphics.UI.Gtk.Embedding.Types
WidgetClass Plug Source # |
Instance details Defined in Graphics.UI.Gtk.Embedding.Types
WindowClass Plug Source # |
Instance details Defined in Graphics.UI.Gtk.Embedding.Types

class WindowClass o => PlugClass o Source #

#### Instances

Instances details

PlugClass Plug Source # |
Instance details Defined in Graphics.UI.Gtk.Embedding.Types

castToPlug :: GObjectClass obj => obj -> Plug Source #

gTypePlug :: GType Source #

toPlug :: PlugClass o => o -> Plug Source #

data NativeWindowId Source #

The identifier of a window of the underlying windowing system.

#### Instances

Instances details

Show NativeWindowId Source # |
Instance details Defined in Graphics.UI.Gtk.General.Structs Methods showsPrec :: Int -> NativeWindowId -> ShowS Source # show :: NativeWindowId -> String Source # showList :: [NativeWindowId] -> ShowS Source #
Eq NativeWindowId Source # |
Instance details Defined in Graphics.UI.Gtk.General.Structs Methods (==) :: NativeWindowId -> NativeWindowId -> Bool Source # (/=) :: NativeWindowId -> NativeWindowId -> Bool Source #

# Constructors

plugNew Source #

Arguments

:: Maybe NativeWindowId | `socketId` - the window ID of the socket, or `Nothing`.
-> IO Plug |

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

If a NativeWindowId is supplied the foreign application window will immediately appear in this `Plug` once it is shown. If `Nothing` is passed then a `NativeWindowId` can be extracted from this `Plug` using `plugGetId` and be passed to the application which is to be embedded.

plugNewForDisplay Source #

Arguments

:: Display | `display` - the `Display` on which `socketId` is displayed
-> Maybe NativeWindowId | `socketId` - the XID of the socket's window.
-> IO Plug |

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

- Available since Gtk+ version 2.2

# Methods

plugGetId Source #

Arguments

:: PlugClass self |
=> self |
-> IO NativeWindowId | 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`.

plugGetEmbedded Source #

Arguments

:: PlugClass self |
=> self |
-> IO Bool | returns `True` if the plug is embedded in a socket

Determines whether the plug is embedded in a socket.

- Available since Gtk+ version 2.14

plugGetSocketWindow Source #

Arguments

:: PlugClass self |
=> self |
-> IO (Maybe DrawWindow) | returns the window of the socket

Retrieves the socket the plug is embedded in.

- Available since Gtk+ version 2.14

# Attributes

plugAttrEmbedded :: PlugClass self => ReadAttr self Bool Source #

`True` if the plug is embedded in a socket.

Default value: `False`

- Available since Gtk+ version 2.12

plugAttrSocketWindow :: PlugClass self => ReadAttr self (Maybe DrawWindow) Source #

The window of the socket the plug is embedded in.

- Available since Gtk+ version 2.14

# Signals

plugEmbedded :: PlugClass self => Signal self (IO ()) Source #

Gets emitted when the plug becomes embedded in a socket and when the embedding ends.