X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkenums.h;h=daff2f0ddffe124ede50a7329d264ae26971748c;hb=c3577c66e57d8077b285c2f20e518398143735c2;hp=e409d79c7eb0e8e850219e69e0fe1cc7af413eee;hpb=5de021cfdc21308ecbc6ce7d99c873e6be512c80;p=~andy%2Fgtk diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index e409d79c7..daff2f0dd 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -803,6 +803,23 @@ typedef enum GTK_DRAG_RESULT_ERROR } GtkDragResult; +/** + * GtkSizeGroupMode: + * @GTK_SIZE_GROUP_NONE: group has no effect + * @GTK_SIZE_GROUP_HORIZONTAL: group affects horizontal requisition + * @GTK_SIZE_GROUP_VERTICAL: group affects vertical requisition + * @GTK_SIZE_GROUP_BOTH: group affects both horizontal and vertical requisition + * + * The mode of the size group determines the directions in which the size + * group affects the requested sizes of its component widgets. + **/ +typedef enum { + GTK_SIZE_GROUP_NONE, + GTK_SIZE_GROUP_HORIZONTAL, + GTK_SIZE_GROUP_VERTICAL, + GTK_SIZE_GROUP_BOTH +} GtkSizeGroupMode; + /** * GtkSizeRequestMode: * @GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH: Prefer height-for-width geometry management @@ -843,8 +860,12 @@ typedef enum * @GTK_STATE_FLAG_INCONSISTENT: Widget is inconsistent. * @GTK_STATE_FLAG_FOCUSED: Widget has the keyboard focus. * @GTK_STATE_FLAG_BACKDROP: Widget is in a background toplevel window. + * @GTK_STATE_FLAG_LTR: Widget is in left-to-right text direction + * @GTK_STATE_FLAG_RTL: Widget is in right-to-left text direction * - * Describes a widget state. + * Describes a widget state. Widget states are used to match the widget + * against CSS pseudo-classes. Note that GTK extends the regular CSS + * classes and sometimes uses different names. */ typedef enum { @@ -855,7 +876,9 @@ typedef enum GTK_STATE_FLAG_INSENSITIVE = 1 << 3, GTK_STATE_FLAG_INCONSISTENT = 1 << 4, GTK_STATE_FLAG_FOCUSED = 1 << 5, - GTK_STATE_FLAG_BACKDROP = 1 << 6 + GTK_STATE_FLAG_BACKDROP = 1 << 6, + GTK_STATE_FLAG_DIR_LTR = 1 << 7, + GTK_STATE_FLAG_DIR_RTL = 1 << 8 } GtkStateFlags; /** @@ -932,7 +955,110 @@ typedef enum { GTK_BORDER_STYLE_RIDGE } GtkBorderStyle; +/** + * GtkLevelBarMode: + * @GTK_LEVEL_BAR_MODE_CONTINUOUS: the bar has a continuous mode + * @GTK_LEVEL_BAR_MODE_DISCRETE: the bar has a discrete mode + * + * Describes how #GtkLevelBar contents should be rendered. + * Note that this enumeration could be extended with additional modes + * in the future. + * + * Since: 3.6 + */ +typedef enum { + GTK_LEVEL_BAR_MODE_CONTINUOUS, + GTK_LEVEL_BAR_MODE_DISCRETE +} GtkLevelBarMode; + G_END_DECLS +/** + * GtkInputPurpose: + * @GTK_INPUT_PURPOSE_FREE_FORM: Allow any character + * @GTK_INPUT_PURPOSE_ALPHA: Allow only alphabetic characters + * @GTK_INPUT_PURPOSE_DIGITS: Allow only digits + * @GTK_INPUT_PURPOSE_NUMBER: Edited field expects numbers + * @GTK_INPUT_PURPOSE_PHONE: Edited field expects phone number + * @GTK_INPUT_PURPOSE_URL: Edited field expects URL + * @GTK_INPUT_PURPOSE_EMAIL: Edited field expects email address + * @GTK_INPUT_PURPOSE_NAME: Edited field expects the name of a person + * @GTK_INPUT_PURPOSE_PASSWORD: Like @GTK_INPUT_PURPOSE_FREE_FORM, but characters are hidden + * @GTK_INPUT_PURPOSE_PIN: Like @GTK_INPUT_PURPOSE_DIGITS, but characters are hidden + * + * 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'. + * + * Since: 3.6 + */ +typedef enum +{ + GTK_INPUT_PURPOSE_FREE_FORM, + GTK_INPUT_PURPOSE_ALPHA, + GTK_INPUT_PURPOSE_DIGITS, + GTK_INPUT_PURPOSE_NUMBER, + GTK_INPUT_PURPOSE_PHONE, + GTK_INPUT_PURPOSE_URL, + GTK_INPUT_PURPOSE_EMAIL, + GTK_INPUT_PURPOSE_NAME, + GTK_INPUT_PURPOSE_PASSWORD, + GTK_INPUT_PURPOSE_PIN +} GtkInputPurpose; + +/** + * GtkInputHints: + * @GTK_INPUT_HINT_NONE: No special behaviour suggested + * @GTK_INPUT_HINT_SPELLCHECK: Suggest checking for typos + * @GTK_INPUT_HINT_NO_SPELLCHECK: Suggest not checking for typos + * @GTK_INPUT_HINT_WORD_COMPLETION: Suggest word completion + * @GTK_INPUT_HINT_LOWERCASE: Suggest to convert all text to lowercase + * @GTK_INPUT_HINT_UPPERCASE_CHARS: Suggest to capitalize all text + * @GTK_INPUT_HINT_UPPERCASE_WORDS: Suggest to capitalize the first + * character of each word + * @GTK_INPUT_HINT_UPPERCASE_SENTENCES: Suggest to capitalize the + * first word of each sentence + * @GTK_INPUT_HINT_INHIBIT_OSK: Suggest to not show an onscreen keyboard + * (e.g for a calculator that already has all the keys). + * + * Describes hints that might be taken into account by input methods + * or applications. Note that input methods may already tailor their + * behaviour according to the #GtkInputPurpose of the entry. + * + * Some common sense is expected when using these flags - mixing + * @GTK_INPUT_HINT_LOWERCASE with any of the uppercase hints makes no sense. + * + * This enumeration may be extended in the future; input methods should + * ignore unknown values. + * + * Since: 3.6 + */ +typedef enum +{ + GTK_INPUT_HINT_NONE = 0, + GTK_INPUT_HINT_SPELLCHECK = 1 << 0, + GTK_INPUT_HINT_NO_SPELLCHECK = 1 << 1, + GTK_INPUT_HINT_WORD_COMPLETION = 1 << 2, + GTK_INPUT_HINT_LOWERCASE = 1 << 3, + GTK_INPUT_HINT_UPPERCASE_CHARS = 1 << 4, + GTK_INPUT_HINT_UPPERCASE_WORDS = 1 << 5, + GTK_INPUT_HINT_UPPERCASE_SENTENCES = 1 << 6, + GTK_INPUT_HINT_INHIBIT_OSK = 1 << 7 +} GtkInputHints; #endif /* __GTK_ENUMS_H__ */