summaryrefslogtreecommitdiff
path: root/gtk/gtkpopover.h
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2020-08-07 17:06:08 -0700
committerChristian Hergert <chergert@redhat.com>2020-08-07 17:10:52 -0700
commit4d88e3af171a0eecca3e944ff649d2116905601c (patch)
treeb7dc847cfe1a1c8812f7cae5d0bbf0f0c25bbcbd /gtk/gtkpopover.h
parent7625ccd6fac09a4e341608d1de60a8c332368346 (diff)
downloadgtk+-4d88e3af171a0eecca3e944ff649d2116905601c.tar.gz
popover: allow setting popup layout offset
Currently there is no way to alter the offset of the popup when positioning with GdkPopupLayout. This makes using the popup difficult for scenarios like completion windows where you may need to offset the window by a given amount for aligning text. gtk_popover_set_offset() allows setting these values and are analagous to the function of the same name for GdkPopupLayout.
Diffstat (limited to 'gtk/gtkpopover.h')
-rw-r--r--gtk/gtkpopover.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtkpopover.h b/gtk/gtkpopover.h
index 965ad195d5..a27fdf431a 100644
--- a/gtk/gtkpopover.h
+++ b/gtk/gtkpopover.h
@@ -104,6 +104,15 @@ GDK_AVAILABLE_IN_ALL
void gtk_popover_popdown (GtkPopover *popover);
GDK_AVAILABLE_IN_ALL
+void gtk_popover_set_offset (GtkPopover *popover,
+ int x_offset,
+ int y_offset);
+GDK_AVAILABLE_IN_ALL
+void gtk_popover_get_offset (GtkPopover *popover,
+ int *x_offset,
+ int *y_offset);
+
+GDK_AVAILABLE_IN_ALL
void gtk_popover_set_default_widget (GtkPopover *popover,
GtkWidget *widget);