Top | ![]() |
![]() |
![]() |
![]() |
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 () |
gboolean | autohide | Read / Write / Construct Only |
GdkSurface * | parent | Read / Write / Construct Only |
A GdkPopup is a surface that is attached to another surface, and is positioned relative to it.
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.
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 |
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.
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.
GdkSurface *
gdk_popup_get_parent (GdkPopup *popup
);
Returns the parent surface of a popup.
int
gdk_popup_get_position_x (GdkPopup *popup
);
Obtains the position of the popup relative to its parent.
int
gdk_popup_get_position_y (GdkPopup *popup
);
Obtains the position of the popup relative to its parent.
“autohide”
property “autohide” gboolean
Whether to hide on outside clicks.
Owner: GdkPopup
Flags: Read / Write / Construct Only
Default value: FALSE
“parent”
property“parent” GdkSurface *
The parent surface.
Owner: GdkPopup
Flags: Read / Write / Construct Only
“popup-layout-changed”
signalvoid user_function (GdkPopup *popup, gpointer user_data)
Emitted when the layout of a popup surface has changed, e.g. if the popup layout was reactive and after the parent moved causing the popover to end up partially off-screen.
popup |
the GdkSurface that was laid out |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First