[gtk: 1/2] imwayland: Suppport terminal purpose
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] imwayland: Suppport terminal purpose
- Date: Thu, 12 Dec 2019 17:57:53 +0000 (UTC)
commit e331b39ca543e36dcf6a6a3300e616b97721cb50
Author: Dorota Czaplejewicz <dorota czaplejewicz puri sm>
Date: Thu Dec 12 14:37:51 2019 +0000
imwayland: Suppport terminal purpose
gtk/gtkenums.h | 4 +++-
gtk/gtkimcontextwayland.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index 9bd6f1632e..c23bf05b17 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -862,6 +862,7 @@ G_END_DECLS
* @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
+ * @GTK_INPUT_PURPOSE_TERMINAL: Allow any character, in addition to control codes
*
* Describes primary purpose of the input widget. This information is
* useful for on-screen keyboards and similar input methods to decide
@@ -893,7 +894,8 @@ typedef enum
GTK_INPUT_PURPOSE_EMAIL,
GTK_INPUT_PURPOSE_NAME,
GTK_INPUT_PURPOSE_PASSWORD,
- GTK_INPUT_PURPOSE_PIN
+ GTK_INPUT_PURPOSE_PIN,
+ GTK_INPUT_PURPOSE_TERMINAL,
} GtkInputPurpose;
/**
diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c
index 647f238d1c..3344a68cad 100644
--- a/gtk/gtkimcontextwayland.c
+++ b/gtk/gtkimcontextwayland.c
@@ -424,6 +424,8 @@ translate_purpose (GtkInputPurpose purpose)
return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PASSWORD;
case GTK_INPUT_PURPOSE_PIN:
return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PIN;
+ case GTK_INPUT_PURPOSE_TERMINAL:
+ return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TERMINAL;
default:
g_assert_not_reached ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]