[libdazzle] suggestion: add accessor for popover window



commit 6a296efb2b348241a90d97e13c167184c38f21e7
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 4 23:01:18 2019 -0800

    suggestion: add accessor for popover window

 src/suggestions/dzl-suggestion-entry.c | 21 +++++++++++++++++++++
 src/suggestions/dzl-suggestion-entry.h |  2 ++
 2 files changed, 23 insertions(+)
---
diff --git a/src/suggestions/dzl-suggestion-entry.c b/src/suggestions/dzl-suggestion-entry.c
index 546e425..f8ecad5 100644
--- a/src/suggestions/dzl-suggestion-entry.c
+++ b/src/suggestions/dzl-suggestion-entry.c
@@ -1015,3 +1015,24 @@ _dzl_suggestion_entry_reposition (DzlSuggestionEntry   *self,
   gtk_widget_set_size_request (GTK_WIDGET (popover), alloc.width, -1);
   gtk_window_move (GTK_WINDOW (popover), alloc.x, alloc.y);
 }
+
+/**
+ * dzl_suggestion_entry_get_popover:
+ * @self: a #DzlSuggestionEntry
+ *
+ * Gets the result display widget for the entry. This is currently
+ * always a #DzlSuggestionPopover.
+ *
+ * Returns: (transfer none): a #GtkWidget
+ *
+ * Since: 3.32
+ */
+GtkWidget *
+dzl_suggestion_entry_get_popover (DzlSuggestionEntry *self)
+{
+  DzlSuggestionEntryPrivate *priv = dzl_suggestion_entry_get_instance_private (self);
+
+  g_return_val_if_fail (DZL_IS_SUGGESTION_ENTRY (self), NULL);
+
+  return GTK_WIDGET (priv->popover);
+}
diff --git a/src/suggestions/dzl-suggestion-entry.h b/src/suggestions/dzl-suggestion-entry.h
index c69e6f5..a6d1f76 100644
--- a/src/suggestions/dzl-suggestion-entry.h
+++ b/src/suggestions/dzl-suggestion-entry.h
@@ -94,6 +94,8 @@ void           dzl_suggestion_entry_set_activate_on_single_click (DzlSuggestionE
                                                                   gboolean                   
activate_on_single_click);
 DZL_AVAILABLE_IN_3_30
 void           dzl_suggestion_entry_hide_suggestions             (DzlSuggestionEntry        *self);
+DZL_AVAILABLE_IN_3_32
+GtkWidget     *dzl_suggestion_entry_get_popover                  (DzlSuggestionEntry        *self);
 
 DZL_AVAILABLE_IN_ALL
 void dzl_suggestion_entry_default_position_func (DzlSuggestionEntry *self,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]