diff options
author | Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> | 2020-02-12 17:15:28 +0000 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-02-20 16:21:44 +0100 |
commit | 37adcac5d12904ada88da8ff8b73a6745b8e7f7a (patch) | |
tree | c3b44dde7a0f36800dcf1f3c102b069eb5f2fb9a /include/wlr | |
parent | 68820d6c3d05922a58897078bcb13f8041471772 (diff) |
text_input_v3: Note features supported by the text field
With this information, consumers can realize they will never retrieve some state, and adjust their strategy.
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_text_input_v3.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_text_input_v3.h b/include/wlr/types/wlr_text_input_v3.h index 079a3e8a..74dc26c3 100644 --- a/include/wlr/types/wlr_text_input_v3.h +++ b/include/wlr/types/wlr_text_input_v3.h @@ -13,6 +13,12 @@ #include <wlr/types/wlr_seat.h> #include <wlr/types/wlr_surface.h> +enum wlr_text_input_v3_features { + WLR_TEXT_INPUT_V3_FEATURE_SURROUNDING_TEXT = 1 << 0, + WLR_TEXT_INPUT_v3_FEATURE_CONTENT_TYPE = 1 << 1, + WLR_TEXT_INPUT_V3_FEATURE_CURSOR_RECTANGLE = 1 << 2, +}; + struct wlr_text_input_v3_state { struct { char *text; // NULL is allowed and equivalent to empty string @@ -33,6 +39,10 @@ struct wlr_text_input_v3_state { int32_t width; int32_t height; } cursor_rectangle; + + // Tracks which features were used in the current commit. + // Useful in the enabling commit, where usage means support. + uint32_t features; // OR'ed wlr_text_input_v3_features }; struct wlr_text_input_v3 { @@ -44,6 +54,8 @@ struct wlr_text_input_v3 { uint32_t current_serial; // next in line to send bool pending_enabled; bool current_enabled; + // supported in the current text input, more granular than surface + uint32_t active_features; // OR'ed wlr_text_input_v3_features struct wl_list link; |