package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gdk/Ocgtk_gdk/Gdk/Wrappers/Popup/index.html
Module Wrappers.Popup
type t = [ `popup ] Gobject.objval from_gobject : 'a Gobject.obj -> tval present : t -> int -> int -> [ `popup_layout ] Gobject.obj -> boolPresent @popup after having processed the `GdkPopupLayout` 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 should be handled in response to the signal@Gdk.Surface::layout signal being emitted. The resulting popup position can be queried using method@Gdk.Popup.get_position_x, method@Gdk.Popup.get_position_y, and the resulting size will be sent as parameters in the layout signal. Use method@Gdk.Popup.get_rect_anchor and method@Gdk.Popup.get_surface_anchor to get the resulting anchors.
Presenting may fail, for example if the @popup is set to autohide and is immediately hidden upon being presented. If presenting failed, the signal@Gdk.Surface::layout signal will not me emitted.
val get_surface_anchor : t -> Gdk_enums.gravityGets the current popup surface anchor.
The value returned may change after calling method@Gdk.Popup.present, or after the signal@Gdk.Surface::layout signal is emitted.
val get_rect_anchor : t -> Gdk_enums.gravityGets the current popup rectangle anchor.
The value returned may change after calling method@Gdk.Popup.present, or after the signal@Gdk.Surface::layout signal is emitted.
val get_position_y : t -> intObtains the position of the popup relative to its parent.
val get_position_x : t -> intObtains the position of the popup relative to its parent.
val get_parent : t -> [ `surface | `object_ ] Gobject.obj optionReturns the parent surface of a popup.
val get_autohide : t -> boolReturns whether this popup is set to hide on outside clicks.