aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin_textedit.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@embedded.pro>2017-08-27 13:43:53 +0200
committerJoel Bodenmann <joel@embedded.pro>2017-08-27 13:43:53 +0200
commit285c6528e65c3fa9a898e03b261fcaf8121308cd (patch)
tree0895be81ed272a7e32bb1ed4df273a488ccce8ed /src/gwin/gwin_textedit.h
parentf9494c44a2406b4b7dd753076f1dfc8380e19500 (diff)
parentdb7971734fc940851b6d91a77a60906622f6c491 (diff)
downloaduGFX-285c6528e65c3fa9a898e03b261fcaf8121308cd.tar.gz
uGFX-285c6528e65c3fa9a898e03b261fcaf8121308cd.tar.bz2
uGFX-285c6528e65c3fa9a898e03b261fcaf8121308cd.zip
Merge branch 'master' of git.ugfx.io:uGFX/uGFX
Diffstat (limited to 'src/gwin/gwin_textedit.h')
-rw-r--r--src/gwin/gwin_textedit.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gwin/gwin_textedit.h b/src/gwin/gwin_textedit.h
index ed2f634d..8cf6c03e 100644
--- a/src/gwin/gwin_textedit.h
+++ b/src/gwin/gwin_textedit.h
@@ -64,6 +64,32 @@ GHandle gwinGTexteditCreate(GDisplay* g, GTexteditObject* wt, GWidgetInit* pInit
#define gwinTexteditCreate(wt, pInit, maxSize) gwinGTexteditCreate(GDISP, wt, pInit, maxSize)
/**
+ * @brief Send a special key to the textedit such as GKEY_LEFT, GKEY_RIGHT, GKEY_HOME, GKEY_END
+ *
+ * @param[in] gh The window handle (must be a textedit window)
+ * @param[in] key The special key to send.
+ * @pre Requires GINPUT_NEED_KEYBOARD or GWIN_NEED_KEYBOARD to be on
+ * @api
+ */
+void gwinTextEditSendSpecialKey(GHandle gh, uint8_t key);
+
+/**
+ * @brief Send a normal utf8 character to the textedit
+ *
+ * @param[in] gh The window handle (must be a textedit window)
+ * @param[in] pkey The pointer to the utf8 character to send.
+ * @param[in] len The length of the utf8 character in bytes.
+ * @note This must ONLY be called with a single utf8 character at a time. Don't attempt to
+ * send a string of characters in the one call.
+ * @note Characters are interpreted as if they came directly from a keyboard ie a backspace
+ * character will perform the backspace operation, a tab will send the focus to the next
+ * control etc.
+ * @pre Requires GINPUT_NEED_KEYBOARD or GWIN_NEED_KEYBOARD to be on
+ * @api
+ */
+void gwinTextEditSendKey(GHandle gh, char *pkey, unsigned len);
+
+/**
* @defgroup Renderings_Textedit Renderings
*
* @brief Built-in rendering functions for the textedit widget.