aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin_textedit.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-08-14 18:33:16 +0200
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-08-14 18:33:16 +0200
commitfcaa42972964e002474e6f79364f3af1a616d25c (patch)
tree9a8d054e76ded077e5fc8e6df3937f0deacfa98d /src/gwin/gwin_textedit.h
parent51633811777a0424d9bfe77143384a20f832c565 (diff)
downloaduGFX-fcaa42972964e002474e6f79364f3af1a616d25c.tar.gz
uGFX-fcaa42972964e002474e6f79364f3af1a616d25c.tar.bz2
uGFX-fcaa42972964e002474e6f79364f3af1a616d25c.zip
First working Version of TextEdit widget
Diffstat (limited to 'src/gwin/gwin_textedit.h')
-rw-r--r--src/gwin/gwin_textedit.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gwin/gwin_textedit.h b/src/gwin/gwin_textedit.h
index 84057df4..2b5e26e7 100644
--- a/src/gwin/gwin_textedit.h
+++ b/src/gwin/gwin_textedit.h
@@ -31,6 +31,10 @@
// A TextEdit widget
typedef struct GTexteditObject {
GWidgetObject w;
+
+ char* textBuffer;
+ size_t bufferSize;
+ uint16_t cursorPos;
} GTexteditObject;
#ifdef __cplusplus
@@ -46,13 +50,14 @@ extern "C" {
* @param[in] g The GDisplay on which the textedit should be displayed
* @param[in] widget The TextEdit structure to initialise. If this is NULL, the structure is dynamically allocated.
* @param[in] pInit The initialisation parameters to use.
+ * @param[in] bufSize The maximum number of characters the TextEdit widget can hold.
*
* @return NULL if there is no resultat drawing area, otherwise the widget handle.
*
* @api
*/
-GHandle gwinGTexteditCreate(GDisplay* g, GTexteditObject* widget, GWidgetInit* pInit);
-#define gwinTexteditCreate(w, pInit) gwinGTexteditCreate(GDISP, w, pInit)
+GHandle gwinGTexteditCreate(GDisplay* g, GTexteditObject* widget, GWidgetInit* pInit, size_t bufSize);
+#define gwinTexteditCreate(w, pInit, bufSize) gwinGTexteditCreate(GDISP, w, pInit, bufSize)
#ifdef __cplusplus
}