Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
Popups are positioned relative to their parent surface. The GdkPopupLayout struct contains information that is necessary to do so.
Synopsis
- newtype PopupLayout = PopupLayout (ManagedPtr PopupLayout)
- popupLayoutCopy :: (HasCallStack, MonadIO m) => PopupLayout -> m PopupLayout
- popupLayoutEqual :: (HasCallStack, MonadIO m) => PopupLayout -> PopupLayout -> m Bool
- popupLayoutGetAnchorHints :: (HasCallStack, MonadIO m) => PopupLayout -> m [AnchorHints]
- popupLayoutGetAnchorRect :: (HasCallStack, MonadIO m) => PopupLayout -> m Rectangle
- popupLayoutGetOffset :: (HasCallStack, MonadIO m) => PopupLayout -> Int32 -> Int32 -> m ()
- popupLayoutGetRectAnchor :: (HasCallStack, MonadIO m) => PopupLayout -> m Gravity
- popupLayoutGetSurfaceAnchor :: (HasCallStack, MonadIO m) => PopupLayout -> m Gravity
- popupLayoutNew :: (HasCallStack, MonadIO m) => Rectangle -> Gravity -> Gravity -> m PopupLayout
- popupLayoutRef :: (HasCallStack, MonadIO m) => PopupLayout -> m PopupLayout
- popupLayoutSetAnchorHints :: (HasCallStack, MonadIO m) => PopupLayout -> [AnchorHints] -> m ()
- popupLayoutSetAnchorRect :: (HasCallStack, MonadIO m) => PopupLayout -> Rectangle -> m ()
- popupLayoutSetOffset :: (HasCallStack, MonadIO m) => PopupLayout -> Int32 -> Int32 -> m ()
- popupLayoutSetRectAnchor :: (HasCallStack, MonadIO m) => PopupLayout -> Gravity -> m ()
- popupLayoutSetSurfaceAnchor :: (HasCallStack, MonadIO m) => PopupLayout -> Gravity -> m ()
- popupLayoutUnref :: (HasCallStack, MonadIO m) => PopupLayout -> m ()
Exported types
newtype PopupLayout Source #
Memory-managed wrapper type.
Instances
Eq PopupLayout Source # | |
Defined in GI.Gdk.Structs.PopupLayout (==) :: PopupLayout -> PopupLayout -> Bool # (/=) :: PopupLayout -> PopupLayout -> Bool # | |
IsGValue PopupLayout Source # | Convert |
Defined in GI.Gdk.Structs.PopupLayout toGValue :: PopupLayout -> IO GValue # fromGValue :: GValue -> IO PopupLayout # | |
ManagedPtrNewtype PopupLayout Source # | |
Defined in GI.Gdk.Structs.PopupLayout | |
TypedObject PopupLayout Source # | |
Defined in GI.Gdk.Structs.PopupLayout | |
GBoxed PopupLayout Source # | |
Defined in GI.Gdk.Structs.PopupLayout | |
HasParentTypes PopupLayout Source # | |
Defined in GI.Gdk.Structs.PopupLayout | |
type ParentTypes PopupLayout Source # | |
Defined in GI.Gdk.Structs.PopupLayout |
Methods
Overloaded methods
copy
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> m PopupLayout | Returns: a copy of |
Create a new PopupLayout
and copy the contents of layout
into it.
equal
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> PopupLayout |
|
-> m Bool | Returns: |
Check whether layout
and other
has identical layout properties.
getAnchorHints
popupLayoutGetAnchorHints Source #
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> m [AnchorHints] | Returns: the |
Get the AnchorHints
.
getAnchorRect
popupLayoutGetAnchorRect Source #
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> m Rectangle | Returns: The anchor rectangle. |
Get the anchor rectangle.
getOffset
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Get the delta the anchor rectangle is offset with
getRectAnchor
popupLayoutGetRectAnchor Source #
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> m Gravity | Returns: the anchor on the anchor rectangle. |
Returns the anchor position on the anchor rectangle.
getSurfaceAnchor
popupLayoutGetSurfaceAnchor Source #
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> m Gravity | Returns: the anchor on the popup surface. |
Returns the anchor position on the popup surface.
new
:: (HasCallStack, MonadIO m) | |
=> Rectangle |
|
-> Gravity |
|
-> Gravity |
|
-> m PopupLayout | Returns: newly created instance of |
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
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> m PopupLayout | Returns: the same |
Increases the reference count of value
.
setAnchorHints
popupLayoutSetAnchorHints Source #
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> [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 #
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> Rectangle |
|
-> m () |
Set the anchor rectangle.
setOffset
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Offset the position of the anchor rectangle with the given delta.
setRectAnchor
popupLayoutSetRectAnchor Source #
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> Gravity |
|
-> m () |
Set the anchor on the anchor rectangle.
setSurfaceAnchor
popupLayoutSetSurfaceAnchor Source #
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> Gravity |
|
-> m () |
Set the anchor on the popup surface.
unref
:: (HasCallStack, MonadIO m) | |
=> PopupLayout |
|
-> m () |
Decreases the reference count of value
.