Method

GdkPopuppresent

Declaration [src]

gboolean
gdk_popup_present (
  GdkPopup* popup,
  int width,
  int height,
  GdkPopupLayout* layout
)

Description [src]

Present popup after having processed the GdkPopupLayout rules.

If the popup was previously not showing, it will be shown, otherwise it will change position according to layout.

After calling this function, the result should be handled in response to the GdkSurface::layout signal being emitted. The resulting popup position can be queried using gdk_popup_get_position_x(), gdk_popup_get_position_y(), and the resulting size will be sent as parameters in the layout signal. Use gdk_popup_get_rect_anchor() and 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 GdkSurface::layout signal will not me emitted.

Parameters

width

Type: int

The unconstrained popup width to layout.

height

Type: int

The unconstrained popup height to layout.

layout

Type: GdkPopupLayout

The GdkPopupLayout object used to layout.

The data is owned by the caller of the method.

Return value

Type: gboolean

FALSE if it failed to be presented, otherwise TRUE.