diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-08-17 00:18:54 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-08-17 00:18:54 +1000 |
commit | 3fea02324831eba1773f45b1dc6d0bf2a0c8326d (patch) | |
tree | 21b3741388871035e9dcef8e024bbeb6c08a7c7a /demos/modules/gwin/textedit | |
parent | 058a873e9e425207db8b99be083e87cf956b9827 (diff) | |
download | uGFX-3fea02324831eba1773f45b1dc6d0bf2a0c8326d.tar.gz uGFX-3fea02324831eba1773f45b1dc6d0bf2a0c8326d.tar.bz2 uGFX-3fea02324831eba1773f45b1dc6d0bf2a0c8326d.zip |
Add some keyboard widget support
Diffstat (limited to 'demos/modules/gwin/textedit')
-rw-r--r-- | demos/modules/gwin/textedit/gfxconf.h | 3 | ||||
-rw-r--r-- | demos/modules/gwin/textedit/main.c | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/demos/modules/gwin/textedit/gfxconf.h b/demos/modules/gwin/textedit/gfxconf.h index 3c5d7b96..4faaae82 100644 --- a/demos/modules/gwin/textedit/gfxconf.h +++ b/demos/modules/gwin/textedit/gfxconf.h @@ -63,7 +63,10 @@ /* Features for the GINPUT subsystem. */ #define GINPUT_NEED_MOUSE TRUE + +/* One or both of these */ #define GINPUT_NEED_KEYBOARD TRUE +#define GWIN_NEED_KEYBOARD TRUE /* Features for the GQUEUE subsystem. */ #define GFX_USE_GQUEUE TRUE diff --git a/demos/modules/gwin/textedit/main.c b/demos/modules/gwin/textedit/main.c index ed52ccb2..4072f983 100644 --- a/demos/modules/gwin/textedit/main.c +++ b/demos/modules/gwin/textedit/main.c @@ -34,6 +34,9 @@ static GHandle ghTextedit1; static GHandle ghTextedit2; static GHandle ghTextedit3; static GListener gl; +#if GWIN_NEED_KEYBOARD + static GHandle ghKeyboard; +#endif static void guiCreate(void) { @@ -80,6 +83,17 @@ static void guiCreate(void) wi.text = "the different widgets"; ghTextedit3 = gwinTexteditCreate(0, &wi, 100); //gwinTexteditSetBorder(ghTextedit3, TRUE); + + // Virtual keyboard +#if GWIN_NEED_KEYBOARD + wi.g.show = TRUE; + wi.g.x = 0; + wi.g.y = gdispGetHeight()*3/4; + wi.g.width = gdispGetWidth(); + wi.g.height = gdispGetHeight()/4; + ghKeyboard = gwinKeyboardCreate(0, &wi); +#endif + } int main(void) { |