gi-gtk3-3.0.44: Gtk 3.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.OffscreenWindow

Contents

- Exported types
- Methods
  - getPixbuf
  - getSurface
  - new

Description

GtkOffscreenWindow is strictly intended to be used for obtaining snapshots of widgets that are not part of a normal widget hierarchy. Since `OffscreenWindow` is a toplevel widget you cannot obtain snapshots of a full window with it since you cannot pack a toplevel widget in another toplevel.

The idea is to take a widget and manually set the state of it, add it to a GtkOffscreenWindow and then retrieve the snapshot as a `Surface` or `Pixbuf`.

GtkOffscreenWindow derives from `Window` only as an implementation detail. Applications should not use any API specific to `Window` to operate on this object. It should be treated as a `Bin` that has no parent widget.

When contained offscreen widgets are redrawn, GtkOffscreenWindow will emit a Widget::damageEvent signal.

Synopsis

- newtype OffscreenWindow = OffscreenWindow (ManagedPtr OffscreenWindow)
- class (GObject o, IsDescendantOf OffscreenWindow o) => IsOffscreenWindow o
- toOffscreenWindow :: (MonadIO m, IsOffscreenWindow o) => o -> m OffscreenWindow
- offscreenWindowGetPixbuf :: (HasCallStack, MonadIO m, IsOffscreenWindow a) => a -> m (Maybe Pixbuf)
- offscreenWindowGetSurface :: (HasCallStack, MonadIO m, IsOffscreenWindow a) => a -> m (Maybe Surface)
- offscreenWindowNew :: (HasCallStack, MonadIO m) => m OffscreenWindow

# Exported types

newtype OffscreenWindow Source #

Memory-managed wrapper type.

Constructors

OffscreenWindow (ManagedPtr OffscreenWindow) |

#### Instances

Instances details

Eq OffscreenWindow Source # |
Instance details Defined in GI.Gtk.Objects.OffscreenWindow Methods (==) :: OffscreenWindow -> OffscreenWindow -> Bool Source # (/=) :: OffscreenWindow -> OffscreenWindow -> Bool Source #
GObject OffscreenWindow Source # |
Instance details Defined in GI.Gtk.Objects.OffscreenWindow
ManagedPtrNewtype OffscreenWindow Source # |
Instance details Defined in GI.Gtk.Objects.OffscreenWindow Methods toManagedPtr :: OffscreenWindow -> ManagedPtr OffscreenWindow Source #
TypedObject OffscreenWindow Source # |
Instance details Defined in GI.Gtk.Objects.OffscreenWindow Methods glibType :: IO GType Source #
HasParentTypes OffscreenWindow Source # |
Instance details Defined in GI.Gtk.Objects.OffscreenWindow
IsGValue (Maybe OffscreenWindow) Source # | Convert `OffscreenWindow` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.OffscreenWindow Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe OffscreenWindow -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe OffscreenWindow) Source #
type ParentTypes OffscreenWindow Source # |
Instance details Defined in GI.Gtk.Objects.OffscreenWindow type ParentTypes OffscreenWindow = '[Window, Bin, Container, Widget, Object, ImplementorIface, Buildable]

class (GObject o, IsDescendantOf OffscreenWindow o) => IsOffscreenWindow o Source #

Type class for types which can be safely cast to `OffscreenWindow`, for instance with `toOffscreenWindow`.

#### Instances

Instances details

(GObject o, IsDescendantOf OffscreenWindow o) => IsOffscreenWindow o Source # |
Instance details Defined in GI.Gtk.Objects.OffscreenWindow

toOffscreenWindow :: (MonadIO m, IsOffscreenWindow o) => o -> m OffscreenWindow Source #

Cast to `OffscreenWindow`, 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, constructChild, 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, getEvents, getFocus, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusOnMap, getFocusVadjustment, getFocusVisible, getFontMap, getFontOptions, getFrameClock, getGravity, getGroup, getHalign, getHasResizeGrip, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHideTitlebarWhenMaximized, getIcon, getIconList, getIconName, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getMnemonicModifier, getMnemonicsVisible, getModal, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPixbuf, 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, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getSurface, 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.

## getPixbuf

offscreenWindowGetPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m, IsOffscreenWindow a) |
=> a | `offscreen`: the `OffscreenWindow` contained widget.
-> m (Maybe Pixbuf) | Returns: A `Pixbuf` pointer, or `Nothing`.

Retrieves a snapshot of the contained widget in the form of a `Pixbuf`. This is a new pixbuf with a reference count of 1, and the application should unreference it once it is no longer needed.

Since: 2.20

## getSurface

offscreenWindowGetSurface Source #

Arguments

:: (HasCallStack, MonadIO m, IsOffscreenWindow a) |
=> a | `offscreen`: the `OffscreenWindow` contained widget.
-> m (Maybe Surface) | Returns: A `Surface` pointer to the offscreen surface, or `Nothing`.

Retrieves a snapshot of the contained widget in the form of a `Surface`. If you need to keep this around over window resizes then you should add a reference to it.

Since: 2.20

## new

offscreenWindowNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m OffscreenWindow | Returns: A pointer to a `Widget`

Creates a toplevel container widget that is used to retrieve snapshots of widgets without showing them on the screen.

Since: 2.20