gi-gtk-3.0.37: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.Plug

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 #

Memory-managed wrapper type.

Constructors

Plug (ManagedPtr Plug) 

Instances

Instances details
Eq Plug Source # 
Instance details

Defined in GI.Gtk.Objects.Plug

Methods

(==) :: Plug -> Plug -> Bool #

(/=) :: Plug -> Plug -> Bool #

GObject Plug Source # 
Instance details

Defined in GI.Gtk.Objects.Plug

ManagedPtrNewtype Plug Source # 
Instance details

Defined in GI.Gtk.Objects.Plug

Methods

toManagedPtr :: Plug -> ManagedPtr Plug

TypedObject Plug Source # 
Instance details

Defined in GI.Gtk.Objects.Plug

Methods

glibType :: IO GType

HasParentTypes Plug Source # 
Instance details

Defined in GI.Gtk.Objects.Plug

IsGValue (Maybe Plug) Source #

Convert Plug to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Plug

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Plug -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Plug)

type ParentTypes Plug Source # 
Instance details

Defined in GI.Gtk.Objects.Plug

type ParentTypes Plug = '[Window, Bin, Container, Widget, Object, ImplementorIface, Buildable]

class (GObject o, IsDescendantOf Plug o) => IsPlug o Source #

Type class for types which can be safely cast to Plug, for instance with toPlug.

Instances

Instances details
(GObject o, IsDescendantOf Plug o) => IsPlug o Source # 
Instance details

Defined in GI.Gtk.Objects.Plug

toPlug :: (MonadIO m, IsPlug o) => o -> m Plug Source #

Cast to Plug, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

activate, activateDefault, activateFocus, activateKey, add, addAccelGroup, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonic, addMnemonicLabel, addTickCallback, beginMoveDrag, beginResizeDrag, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, close, computeExpand, construct, constructChild, constructForDisplay, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, deiconify, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, fullscreen, fullscreenOnMonitor, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasGroup, hasRcStyle, hasScreen, hasToplevelFocus, hasVisibleFocus, hide, hideOnDelete, iconify, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isActive, isAncestor, isComposited, isDrawable, isFloating, isFocus, isMaximized, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, maximize, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, move, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parseGeometry, parserFinished, path, present, presentWithTime, propagateDraw, propagateKeyEvent, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelGroup, removeAccelerator, removeMnemonic, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, reshowWithInitialSize, resize, resizeChildren, resizeGripIsVisible, resizeToGeometry, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, stick, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unfullscreen, unmap, unmaximize, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, unstick, watchClosure.

Getters

getAcceptFocus, getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getApplication, getAttachedTo, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDecorated, getDefaultSize, getDefaultWidget, getDeletable, getDestroyWithParent, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEmbedded, getEvents, getFocus, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusOnMap, getFocusVadjustment, getFocusVisible, getFontMap, getFontOptions, getFrameClock, getGravity, getGroup, getHalign, getHasResizeGrip, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHideTitlebarWhenMaximized, getIcon, getIconList, getIconName, getId, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getMnemonicModifier, getMnemonicsVisible, getModal, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPosition, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizable, getResizeGripArea, getResizeMode, getRole, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSize, getSizeRequest, getSkipPagerHint, getSkipTaskbarHint, getSocketWindow, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTitle, getTitlebar, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getTransientFor, getTypeHint, getUrgencyHint, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow, getWindowType.

Setters

setAccelPath, setAcceptFocus, setAllocation, setAppPaintable, setApplication, setAttachedTo, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDecorated, setDefault, setDefaultGeometry, setDefaultSize, setDeletable, setDestroyWithParent, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocus, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusOnMap, setFocusVadjustment, setFocusVisible, setFontMap, setFontOptions, setGeometryHints, setGravity, setHalign, setHasResizeGrip, setHasTooltip, setHasUserRefCount, setHasWindow, setHexpand, setHexpandSet, setHideTitlebarWhenMaximized, setIcon, setIconFromFile, setIconList, setIconName, setKeepAbove, setKeepBelow, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setMnemonicModifier, setMnemonicsVisible, setModal, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setPosition, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizable, setResizeMode, setRole, setScreen, setSensitive, setSizeRequest, setSkipPagerHint, setSkipTaskbarHint, setStartupId, setState, setStateFlags, setStyle, setSupportMultidevice, setTitle, setTitlebar, setTooltipMarkup, setTooltipText, setTooltipWindow, setTransientFor, setTypeHint, setUrgencyHint, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow, setWmclass.

construct

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

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

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

True if the plug is embedded in a socket.

Since: 2.12

getPlugEmbedded :: (MonadIO m, IsPlug o) => o -> m Bool Source #

Get the value of the “embedded” property. When overloading is enabled, this is equivalent to

get plug #embedded

socketWindow

The window of the socket the plug is embedded in.

Since: 2.14

getPlugSocketWindow :: (MonadIO m, IsPlug o) => o -> m (Maybe Window) Source #

Get the value of the “socket-window” property. When overloading is enabled, this is equivalent to

get plug #socketWindow

Signals

embedded

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

Type for the callback on the (unwrapped) C side.

type PlugEmbeddedCallback = IO () Source #

Gets emitted when the plug becomes embedded in a socket.

afterPlugEmbedded :: (IsPlug a, MonadIO m) => a -> PlugEmbeddedCallback -> m SignalHandlerId Source #

Connect a signal handler for the embedded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after plug #embedded callback

genClosure_PlugEmbedded :: MonadIO m => PlugEmbeddedCallback -> m (GClosure C_PlugEmbeddedCallback) Source #

Wrap the callback into a GClosure.

mk_PlugEmbeddedCallback :: C_PlugEmbeddedCallback -> IO (FunPtr C_PlugEmbeddedCallback) Source #

Generate a function pointer callable from C code, from a C_PlugEmbeddedCallback.

onPlugEmbedded :: (IsPlug a, MonadIO m) => a -> PlugEmbeddedCallback -> m SignalHandlerId Source #

Connect a signal handler for the embedded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on plug #embedded callback