:right-sidebar: True InputPurpose =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: InputPurpose :no-contents-entry: Describes primary purpose of the input widget. This information is useful for on-screen keyboards and similar input methods to decide which keys should be presented to the user. Note that the purpose is not meant to impose a totally strict rule about allowed characters, and does not replace input validation. It is fine for an on-screen keyboard to let the user override the character set restriction that is expressed by the purpose. The application is expected to validate the entry contents, even if it specified a purpose. The difference between :const:`~gi.repository.Gtk.InputPurpose.DIGITS` and :const:`~gi.repository.Gtk.InputPurpose.NUMBER` is that the former accepts only digits while the latter also some punctuation (like commas or points, plus, minus) and “e” or “E” as in 3.14E+000. This enumeration may be extended in the future; input methods should interpret unknown values as “free form”. Fields ------ .. rst-class:: interim-class .. class:: InputPurpose :no-index: .. attribute:: ALPHA The type of the None singleton. .. attribute:: DIGITS The type of the None singleton. .. attribute:: EMAIL The type of the None singleton. .. attribute:: FREE_FORM The type of the None singleton. .. attribute:: NAME The type of the None singleton. .. attribute:: NUMBER The type of the None singleton. .. attribute:: PASSWORD The type of the None singleton. .. attribute:: PHONE The type of the None singleton. .. attribute:: PIN The type of the None singleton. .. attribute:: TERMINAL The type of the None singleton. .. attribute:: URL The type of the None singleton.