forked from AuroraMiddleware/gtk
ca71119a40
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. |
||
---|---|---|
.. | ||
gdkapplaunchcontext-x11.c | ||
gdkasync.c | ||
gdkasync.h | ||
gdkcairocontext-x11.c | ||
gdkcairocontext-x11.h | ||
gdkclipboard-x11.c | ||
gdkclipboard-x11.h | ||
gdkcursor-x11.c | ||
gdkdevice-xi2.c | ||
gdkdevicemanager-x11.c | ||
gdkdevicemanager-xi2.c | ||
gdkdevicemanagerprivate-core.h | ||
gdkdisplay-x11.c | ||
gdkdisplay-x11.h | ||
gdkdrag-x11.c | ||
gdkdrop-x11.c | ||
gdkeventsource.c | ||
gdkeventsource.h | ||
gdkeventtranslator.c | ||
gdkeventtranslator.h | ||
gdkglcontext-x11.c | ||
gdkglcontext-x11.h | ||
gdkkeys-x11.c | ||
gdkmain-x11.c | ||
gdkmonitor-x11.c | ||
gdkmonitor-x11.h | ||
gdkprivate-x11.h | ||
gdkproperty-x11.c | ||
gdkscreen-x11.c | ||
gdkscreen-x11.h | ||
gdkselection-x11.c | ||
gdkselectioninputstream-x11.c | ||
gdkselectioninputstream-x11.h | ||
gdkselectionoutputstream-x11.c | ||
gdkselectionoutputstream-x11.h | ||
gdksettings.c | ||
gdksurface-x11.c | ||
gdksurface-x11.h | ||
gdktextlistconverter-x11.c | ||
gdktextlistconverter-x11.h | ||
gdkvisual-x11.c | ||
gdkvisual-x11.h | ||
gdkvulkancontext-x11.c | ||
gdkvulkancontext-x11.h | ||
gdkx11applaunchcontext.h | ||
gdkx11device-xi2.h | ||
gdkx11device.h | ||
gdkx11devicemanager-xi2.h | ||
gdkx11devicemanager.h | ||
gdkx11display.h | ||
gdkx11dnd.h | ||
gdkx11glcontext.h | ||
gdkx11keys.h | ||
gdkx11monitor.h | ||
gdkx11property.h | ||
gdkx11screen.h | ||
gdkx11selection.h | ||
gdkx11surface.h | ||
gdkx11utils.h | ||
gdkx-autocleanups.h | ||
gdkx.h | ||
gdkxftdefaults.c | ||
gdkxid.c | ||
meson.build | ||
MwmUtil.h | ||
xsettings-client.c | ||
xsettings-client.h |