| Top |
Functions
| gboolean | gdk_popup_present () |
| GdkGravity | gdk_popup_get_surface_anchor () |
| GdkGravity | gdk_popup_get_rect_anchor () |
| GdkSurface * | gdk_popup_get_parent () |
| int | gdk_popup_get_position_x () |
| int | gdk_popup_get_position_y () |
| gboolean | gdk_popup_get_autohide () |
Properties
| gboolean | autohide | Read / Write / Construct Only |
| GdkSurface * | parent | Read / Write / Construct Only |
Description
A GdkPopup is a surface that is attached to another surface, and is positioned relative to it.
Functions
gdk_popup_present ()
gboolean gdk_popup_present (GdkPopup *popup,int width,int height,GdkPopupLayout *layout);
Present 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 of the layout can be queried
using gdk_popup_get_position_x(), gdk_popup_get_position_y(),
gdk_surface_get_width(), gdk_surface_get_height(),
gdk_popup_get_rect_anchor() and gdk_popup_get_surface_anchor().
Presenting may have fail, for example if it was immediately
hidden if the popup
was set to autohide.
Parameters
popup |
the GdkPopup to show |
|
width |
the unconstrained popup width to layout |
|
height |
the unconstrained popup height to layout |
|
layout |
the GdkPopupLayout object used to layout |
gdk_popup_get_surface_anchor ()
GdkGravity
gdk_popup_get_surface_anchor (GdkPopup *popup);
Gets the current popup surface anchor.
The value returned may change after calling gdk_popup_present(),
or after the "popup-layout-changed" is emitted.
gdk_popup_get_rect_anchor ()
GdkGravity
gdk_popup_get_rect_anchor (GdkPopup *popup);
Gets the current popup rectangle anchor.
The value returned may change after calling gdk_popup_present(),
or after the "popup-layout-changed" is emitted.
gdk_popup_get_parent ()
GdkSurface *
gdk_popup_get_parent (GdkPopup *popup);
Returns the parent surface of a popup.
gdk_popup_get_position_x ()
int
gdk_popup_get_position_x (GdkPopup *popup);
Obtains the position of the popup relative to its parent.
gdk_popup_get_position_y ()
int
gdk_popup_get_position_y (GdkPopup *popup);
Obtains the position of the popup relative to its parent.
Property Details
The “autohide” property
“autohide” gboolean
The parent surface.
Owner: GdkPopup
Flags: Read / Write / Construct Only
Default value: FALSE
The “parent” property
“parent” GdkSurface *
The parent surface.
Owner: GdkPopup
Flags: Read / Write / Construct Only
