Allow toggling the password entry visibility programmatically

We are going to need a method for toggling the visibility from the
accessibility layer.
This commit is contained in:
Emmanuele Bassi 2020-10-15 21:18:35 +01:00
parent f67345eb55
commit a83d3078c2
2 changed files with 10 additions and 2 deletions

View File

@ -136,7 +136,13 @@ focus_changed (GtkWidget *widget)
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;

View File

@ -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