gi-gdk-4.0.2: Gdk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Structs.PopupLayout

Description

Popups are positioned relative to their parent surface. The GdkPopupLayout struct contains information that is necessary to do so.

Synopsis

Exported types

newtype PopupLayout Source #

Memory-managed wrapper type.

Instances

Instances details
Eq PopupLayout Source # 
Instance details

Defined in GI.Gdk.Structs.PopupLayout

IsGValue PopupLayout Source #

Convert PopupLayout to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gdk.Structs.PopupLayout

ManagedPtrNewtype PopupLayout Source # 
Instance details

Defined in GI.Gdk.Structs.PopupLayout

TypedObject PopupLayout Source # 
Instance details

Defined in GI.Gdk.Structs.PopupLayout

Methods

glibType :: IO GType #

GBoxed PopupLayout Source # 
Instance details

Defined in GI.Gdk.Structs.PopupLayout

HasParentTypes PopupLayout Source # 
Instance details

Defined in GI.Gdk.Structs.PopupLayout

type ParentTypes PopupLayout Source # 
Instance details

Defined in GI.Gdk.Structs.PopupLayout

type ParentTypes PopupLayout = '[] :: [Type]

Methods

Overloaded methods

copy

popupLayoutCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> m PopupLayout

Returns: a copy of layout.

Create a new PopupLayout and copy the contents of layout into it.

equal

popupLayoutEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> PopupLayout

other: another PopupLayout

-> m Bool

Returns: True if layout and other have identical layout properties, otherwise False.

Check whether layout and other has identical layout properties.

getAnchorHints

getAnchorRect

popupLayoutGetAnchorRect Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> m Rectangle

Returns: The anchor rectangle.

Get the anchor rectangle.

getOffset

popupLayoutGetOffset Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> Int32

dx: a pointer to where to store the delta x coordinate

-> Int32

dy: a pointer to where to store the delta y coordinate

-> m () 

Get the delta the anchor rectangle is offset with

getRectAnchor

popupLayoutGetRectAnchor Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> m Gravity

Returns: the anchor on the anchor rectangle.

Returns the anchor position on the anchor rectangle.

getSurfaceAnchor

popupLayoutGetSurfaceAnchor Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> m Gravity

Returns: the anchor on the popup surface.

Returns the anchor position on the popup surface.

new

popupLayoutNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Rectangle

anchorRect: the anchor Rectangle to align surface with

-> Gravity

rectAnchor: the point on anchorRect to align with surface's anchor point

-> Gravity

surfaceAnchor: the point on surface to align with rect's anchor point

-> m PopupLayout

Returns: newly created instance of PopupLayout

Create a popup layout description. Used together with gdk_surface_present_popup() to describe how a popup surface should be placed and behave on-screen.

anchorRect is relative to the top-left corner of the surface's parent. rectAnchor and surfaceAnchor determine anchor points on anchorRect and surface to pin together.

The position of anchorRect's anchor point can optionally be offset using popupLayoutSetOffset, which is equivalent to offsetting the position of surface.

ref

popupLayoutRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> m PopupLayout

Returns: the same layout

Increases the reference count of value.

setAnchorHints

popupLayoutSetAnchorHints Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> [AnchorHints]

anchorHints: the new AnchorHints

-> m () 

Set new anchor hints.

The set anchorHints determines how surface will be moved if the anchor points cause it to move off-screen. For example, AnchorHintsFlipX will replace GravityNorthWest with GravityNorthEast and vice versa if surface extends beyond the left or right edges of the monitor.

setAnchorRect

popupLayoutSetAnchorRect Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> Rectangle

anchorRect: the new anchor rectangle

-> m () 

Set the anchor rectangle.

setOffset

popupLayoutSetOffset Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> Int32

dx: x delta to offset the anchor rectangle with

-> Int32

dy: y delta to offset the anchor rectangle with

-> m () 

Offset the position of the anchor rectangle with the given delta.

setRectAnchor

popupLayoutSetRectAnchor Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> Gravity

anchor: the new rect anchor

-> m () 

Set the anchor on the anchor rectangle.

setSurfaceAnchor

popupLayoutSetSurfaceAnchor Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> Gravity

anchor: the new popup surface anchor

-> m () 

Set the anchor on the popup surface.

unref

popupLayoutUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PopupLayout

layout: a PopupLayout

-> m () 

Decreases the reference count of value.