[gtk/a11y/atspi-action: 13/14] Allow toggling the password entry visibility programmatically




commit a83d3078c2487ce61509bdfcb7683d1e873abc66
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Oct 15 21:18:35 2020 +0100

    Allow toggling the password entry visibility programmatically
    
    We are going to need a method for toggling the visibility from the
    accessibility layer.

 gtk/gtkpasswordentry.c        | 10 ++++++++--
 gtk/gtkpasswordentryprivate.h |  2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkpasswordentry.c b/gtk/gtkpasswordentry.c
index 8d5de422b2..8ac1cd3ade 100644
--- a/gtk/gtkpasswordentry.c
+++ b/gtk/gtkpasswordentry.c
@@ -135,8 +135,14 @@ focus_changed (GtkWidget *widget)
   if (entry->keyboard)
     caps_lock_state_changed (entry->keyboard, NULL, widget);
 }
- 
-static void
+
+/*< private >
+ * gtk_password_entry_toggle_peek:
+ * @entry: a #GtkPasswordEntry
+ *
+ * Toggles the text visibility.
+ */
+void
 gtk_password_entry_toggle_peek (GtkPasswordEntry *entry)
 {
   gboolean visibility;
diff --git a/gtk/gtkpasswordentryprivate.h b/gtk/gtkpasswordentryprivate.h
index 2daaaba4fb..ad86f4e020 100644
--- a/gtk/gtkpasswordentryprivate.h
+++ b/gtk/gtkpasswordentryprivate.h
@@ -27,4 +27,6 @@ G_BEGIN_DECLS
 
 GtkText *       gtk_password_entry_get_text_widget      (GtkPasswordEntry *entry);
 
+void            gtk_password_entry_toggle_peek          (GtkPasswordEntry *entry);
+
 G_END_DECLS


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