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.Interfaces.Popup

Description

A Popup is a surface that is attached to another surface, and is positioned relative to it.

Synopsis

Exported types

newtype Popup Source #

Memory-managed wrapper type.

Constructors

Popup (ManagedPtr Popup) 

Instances

Instances details
Eq Popup Source # 
Instance details

Defined in GI.Gdk.Interfaces.Popup

Methods

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

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

IsGValue Popup Source #

Convert Popup to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gdk.Interfaces.Popup

ManagedPtrNewtype Popup Source # 
Instance details

Defined in GI.Gdk.Interfaces.Popup

TypedObject Popup Source # 
Instance details

Defined in GI.Gdk.Interfaces.Popup

Methods

glibType :: IO GType #

GObject Popup Source # 
Instance details

Defined in GI.Gdk.Interfaces.Popup

HasParentTypes Popup Source # 
Instance details

Defined in GI.Gdk.Interfaces.Popup

type ParentTypes Popup Source # 
Instance details

Defined in GI.Gdk.Interfaces.Popup

type ParentTypes Popup = '[Object, Surface]

class (GObject o, IsDescendantOf Popup o) => IsPopup o Source #

Type class for types which can be safely cast to Popup, for instance with toPopup.

Instances

Instances details
(GObject o, IsDescendantOf Popup o) => IsPopup o Source # 
Instance details

Defined in GI.Gdk.Interfaces.Popup

toPopup :: (MonadIO m, IsPopup o) => o -> m Popup Source #

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

Methods

Overloaded methods

getAutohide

popupGetAutohide Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopup a) 
=> a

popup: a Popup

-> m Bool

Returns: True if popup will autohide

Returns whether this popup is set to hide on outside clicks.

getParent

popupGetParent Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopup a) 
=> a

popup: a Popup

-> m Surface

Returns: the parent surface

Returns the parent surface of a popup.

getPositionX

popupGetPositionX Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopup a) 
=> a

popup: a Popup

-> m Int32

Returns: the X coordinate of popup position

Obtains the position of the popup relative to its parent.

getPositionY

popupGetPositionY Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopup a) 
=> a

popup: a Popup

-> m Int32

Returns: the Y coordinate of popup position

Obtains the position of the popup relative to its parent.

getRectAnchor

popupGetRectAnchor Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopup a) 
=> a

popup: a Popup

-> m Gravity

Returns: the current rectangle anchor value of popup

Gets the current popup rectangle anchor.

The value returned may change after calling popupPresent, or after the "popup-layout-changed" is emitted.

getSurfaceAnchor

popupGetSurfaceAnchor Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopup a) 
=> a

popup: a Popup

-> m Gravity

Returns: the current surface anchor value of popup

Gets the current popup surface anchor.

The value returned may change after calling popupPresent, or after the "popup-layout-changed" is emitted.

present

popupPresent Source #

Arguments

:: (HasCallStack, MonadIO m, IsPopup a) 
=> a

popup: the Popup to show

-> Int32

width: the unconstrained popup width to layout

-> Int32

height: the unconstrained popup height to layout

-> PopupLayout

layout: the PopupLayout object used to layout

-> m Bool

Returns: False if it failed to be presented, otherwise True.

Present popup after having processed the PopupLayout rules. If the popup was previously now showing, it will be showed, otherwise it will change position according to layout.

After calling this function, the result of the layout can be queried using popupGetPositionX, popupGetPositionY, surfaceGetWidth, surfaceGetHeight, popupGetRectAnchor and popupGetSurfaceAnchor.

Presenting may have fail, for example if it was immediately hidden if the popup was set to autohide.

Properties

autohide

No description available in the introspection data.

constructPopupAutohide :: (IsPopup o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “autohide” property. This is rarely needed directly, but it is used by new.

getPopupAutohide :: (MonadIO m, IsPopup o) => o -> m Bool Source #

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

get popup #autohide

parent

No description available in the introspection data.

constructPopupParent :: (IsPopup o, MonadIO m, IsSurface a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “parent” property. This is rarely needed directly, but it is used by new.

getPopupParent :: (MonadIO m, IsPopup o) => o -> m Surface Source #

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

get popup #parent