summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2020-02-16 12:59:24 +0100
committerJonas Ådahl <jadahl@gmail.com>2020-02-19 09:47:18 +0100
commitca71119a40ac9b196700855dac6484f4e198bdb1 (patch)
tree7d5a2cc24a6d0f9ee5ffb7712e5860a0becca9d3 /docs
parent37f4c644d34e77d076a818854e2c3467b2b14b54 (diff)
downloadgtk+-ca71119a40ac9b196700855dac6484f4e198bdb1.tar.gz
gdk/surface: Replace move_to_rect() with GdkPopupLayout based API
Replace the gdk_surface_move_to_rect() API with a new GdkSurface method called gdk_surface_present_popup() taking a new GdkPopupLayout object describing how they should be laid out on screen. The layout properties provided are the same as the ones used with gdk_surface_move_to_rect(), except they are now set up using GdkPopupLayout. Calling gdk_surface_present_popup() will either show the popup at the position described using the popup layout object and a new unconstrained size, or reposition it accordingly. In some situations, such as when a popup is set to autohide, presenting may immediately fail, in case the grab was not granted by the display server. After a successful present, the result of the layout can be queried using the following methods: * gdk_surface_get_position() - to get the position relative to its parent * gdk_surface_get_width() - to get the current width * gdk_surface_get_height() - to get the current height * gdk_surface_get_rect_anchor() - to get the anchor point on the anchor rectangle the popup was effectively positioned against given constraints defined by the environment and the layout rules provided via GdkPopupLayout. * gdk_surface_get_surface_anchor() - the same as the one above but for the surface anchor. A new signal replaces the old "moved-to-rect" one - "popup-layout-changed". However, it is only intended to be emitted when the layout changes implicitly by the windowing system, for example if the monitor resolution changed, or the parent window moved.
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/gdk/gdk4-sections.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 48eadea63b..9e9cb5bb24 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -205,7 +205,9 @@ gdk_surface_set_keep_above
gdk_surface_set_keep_below
gdk_surface_set_opacity
gdk_surface_resize
-gdk_surface_move_to_rect
+gdk_surface_present_popup
+gdk_surface_get_popup_rect_anchor
+gdk_surface_get_popup_surface_anchor
gdk_surface_raise
gdk_surface_lower
gdk_surface_restack