InputPurpose

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 %GTK_INPUT_PURPOSE_DIGITS and %GTK_INPUT_PURPOSE_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”.

Entries

Link copied to clipboard

Allow any character

Link copied to clipboard

Allow only alphabetic characters

Link copied to clipboard

Allow only digits

Link copied to clipboard

Edited field expects numbers

Link copied to clipboard

Edited field expects phone number

Link copied to clipboard

Edited field expects URL

Link copied to clipboard

Edited field expects email address

Link copied to clipboard

Edited field expects the name of a person

Link copied to clipboard

Like %GTK_INPUT_PURPOSE_FREE_FORM, but characters are hidden

Link copied to clipboard

Like %GTK_INPUT_PURPOSE_DIGITS, but characters are hidden

Link copied to clipboard

Allow any character, in addition to control codes

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val nativeValue: <Error class: unknown class>
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.