<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkPasswordEntry">
<refmeta>
<refentrytitle role="top_of_page" id="GtkPasswordEntry.top_of_page">GtkPasswordEntry</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkPasswordEntry</refname>
<refpurpose>An entry for secrets</refpurpose>
</refnamediv>

<refsect1 id="GtkPasswordEntry.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-password-entry-new">gtk_password_entry_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-password-entry-set-show-peek-icon">gtk_password_entry_set_show_peek_icon</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-password-entry-get-show-peek-icon">gtk_password_entry_get_show_peek_icon</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-password-entry-set-extra-menu">gtk_password_entry_set_extra_menu</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GMenuModel"><returnvalue>GMenuModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-password-entry-get-extra-menu">gtk_password_entry_get_extra_menu</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkPasswordEntry.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkPasswordEntry--activates-default">activates-default</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GMenuModel"><type>GMenuModel</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkPasswordEntry--extra-menu">extra-menu</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkPasswordEntry--placeholder-text">placeholder-text</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkPasswordEntry--show-peek-icon">show-peek-icon</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkPasswordEntry.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkPasswordEntry-struct">GtkPasswordEntry</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkPasswordEntry.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkPasswordEntry
</screen>
</refsect1>
<refsect1 id="GtkPasswordEntry.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkPasswordEntry implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link> and  <link linkend="GtkEditable">GtkEditable</link>.</para>

</refsect1>

<refsect1 id="GtkPasswordEntry.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkPasswordEntry.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link> is entry that has been tailored for entering secrets.
It does not show its contents in clear text, does not allow to copy it
to the clipboard, and it shows a warning when Caps Lock is engaged.</para>
<para>Optionally, it can offer a way to reveal the contents in clear text.</para>
<para>GtkPasswordEntry provides only minimal API and should be used with the
<link linkend="GtkEditable"><type>GtkEditable</type></link> API.</para>

</refsect1>
<refsect1 id="GtkPasswordEntry.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-password-entry-new" role="function">
<title>gtk_password_entry_new&#160;()</title>
<indexterm zone="gtk-password-entry-new"><primary>gtk_password_entry_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_password_entry_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a <link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link>.</para>
<refsect3 id="gtk-password-entry-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-password-entry-set-show-peek-icon" role="function">
<title>gtk_password_entry_set_show_peek_icon&#160;()</title>
<indexterm zone="gtk-password-entry-set-show-peek-icon"><primary>gtk_password_entry_set_show_peek_icon</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_password_entry_set_show_peek_icon (<parameter><link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link> *entry</parameter>,
                                       <parameter><link linkend="gboolean"><type>gboolean</type></link> show_peek_icon</parameter>);</programlisting>
<para>Sets whether the entry should have a clickable icon
to show the contents of the entry in clear text.</para>
<para>Setting this to <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> also hides the text again.</para>
<refsect3 id="gtk-password-entry-set-show-peek-icon.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>entry</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>show_peek_icon</para></entry>
<entry role="parameter_description"><para>whether to show the peek icon</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-password-entry-get-show-peek-icon" role="function">
<title>gtk_password_entry_get_show_peek_icon&#160;()</title>
<indexterm zone="gtk-password-entry-get-show-peek-icon"><primary>gtk_password_entry_get_show_peek_icon</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_password_entry_get_show_peek_icon (<parameter><link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link> *entry</parameter>);</programlisting>
<para>Returns whether the entry is showing a clickable icon
to reveal the contents of the entry in clear text.</para>
<refsect3 id="gtk-password-entry-get-show-peek-icon.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>entry</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-password-entry-get-show-peek-icon.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if an icon is shown</para>
</refsect3></refsect2>
<refsect2 id="gtk-password-entry-set-extra-menu" role="function">
<title>gtk_password_entry_set_extra_menu&#160;()</title>
<indexterm zone="gtk-password-entry-set-extra-menu"><primary>gtk_password_entry_set_extra_menu</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_password_entry_set_extra_menu (<parameter><link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link> *entry</parameter>,
                                   <parameter><link linkend="GMenuModel"><type>GMenuModel</type></link> *model</parameter>);</programlisting>
<para>Sets a menu model to add when constructing
the context menu for <parameter>entry</parameter>
.</para>
<refsect3 id="gtk-password-entry-set-extra-menu.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>entry</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GMenuModel"><type>GMenuModel</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-password-entry-get-extra-menu" role="function">
<title>gtk_password_entry_get_extra_menu&#160;()</title>
<indexterm zone="gtk-password-entry-get-extra-menu"><primary>gtk_password_entry_get_extra_menu</primary></indexterm>
<programlisting language="C"><link linkend="GMenuModel"><returnvalue>GMenuModel</returnvalue></link>&#160;*
gtk_password_entry_get_extra_menu (<parameter><link linkend="GtkPasswordEntry"><type>GtkPasswordEntry</type></link> *entry</parameter>);</programlisting>
<para>Gets the menu model set with <link linkend="gtk-password-entry-set-extra-menu"><function>gtk_password_entry_set_extra_menu()</function></link>.</para>
<refsect3 id="gtk-password-entry-get-extra-menu.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>entry</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-password-entry-get-extra-menu.returns" role="returns">
<title>Returns</title>
<para>(nullable): the menu model. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkPasswordEntry.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkPasswordEntry-struct" role="struct">
<title>struct GtkPasswordEntry</title>
<indexterm zone="GtkPasswordEntry-struct"><primary>GtkPasswordEntry</primary></indexterm>
<programlisting language="C">struct GtkPasswordEntry;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkPasswordEntry.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkPasswordEntry--activates-default" role="property"><title>The <literal>“activates-default”</literal> property</title>
<indexterm zone="GtkPasswordEntry--activates-default"><primary>GtkPasswordEntry:activates-default</primary></indexterm>
<programlisting>  “activates-default”        <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed.</para><para>Owner: GtkPasswordEntry</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkPasswordEntry--extra-menu" role="property"><title>The <literal>“extra-menu”</literal> property</title>
<indexterm zone="GtkPasswordEntry--extra-menu"><primary>GtkPasswordEntry:extra-menu</primary></indexterm>
<programlisting>  “extra-menu”               <link linkend="GMenuModel"><type>GMenuModel</type></link>&#160;*</programlisting>
<para>A menu model whose contents will be appended to
the context menu.</para>
<para>Owner: GtkPasswordEntry</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkPasswordEntry--placeholder-text" role="property"><title>The <literal>“placeholder-text”</literal> property</title>
<indexterm zone="GtkPasswordEntry--placeholder-text"><primary>GtkPasswordEntry:placeholder-text</primary></indexterm>
<programlisting>  “placeholder-text”         <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>Show text in the entry when it’s empty and unfocused.</para><para>Owner: GtkPasswordEntry</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkPasswordEntry--show-peek-icon" role="property"><title>The <literal>“show-peek-icon”</literal> property</title>
<indexterm zone="GtkPasswordEntry--show-peek-icon"><primary>GtkPasswordEntry:show-peek-icon</primary></indexterm>
<programlisting>  “show-peek-icon”           <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether to show an icon for revealing the content.</para><para>Owner: GtkPasswordEntry</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>

</refentry>
