aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-07-25 19:15:51 +0200
committerJoel Bodenmann <joel@unormal.org>2013-07-25 19:15:51 +0200
commit57eeb16aba2613c1329eafbf7d7453cd67f2cc69 (patch)
tree2903ee511844ab3c3e4af2ed2bd008bc66604ccd /include
parent7cd43464ed721a7abd34e0c0b33a4a3822bbd3ec (diff)
downloaduGFX-57eeb16aba2613c1329eafbf7d7453cd67f2cc69.tar.gz
uGFX-57eeb16aba2613c1329eafbf7d7453cd67f2cc69.tar.bz2
uGFX-57eeb16aba2613c1329eafbf7d7453cd67f2cc69.zip
list widget - work in progress
Diffstat (limited to 'include')
-rw-r--r--include/gos/linux.h1
-rw-r--r--include/gwin/list.h9
2 files changed, 8 insertions, 2 deletions
diff --git a/include/gos/linux.h b/include/gos/linux.h
index 7529a962..508b2b68 100644
--- a/include/gos/linux.h
+++ b/include/gos/linux.h
@@ -16,6 +16,7 @@
#if GFX_USE_OS_LINUX
#include <sys/types.h>
+#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
diff --git a/include/gwin/list.h b/include/gwin/list.h
index 0b525b03..46e32d5c 100644
--- a/include/gwin/list.h
+++ b/include/gwin/list.h
@@ -37,13 +37,16 @@
* @brief A list event
*/
typedef struct GEventGWinList {
- GEventType type; // The type of this event (GEVENT_GWIN_LIST)
- GHandle list; // THe list that has generated the event
+ GEventType type; // The type of this event (GEVENT_GWIN_LIST)
+ GHandle list; // The list
+ int item; // The item that has been selected (or unselected in a multi-select listbox)
} GEventGWinList;
// A list window
typedef struct GListObject {
GWidgetObject w;
+ int cnt; // Number of items currently in the list (quicker than counting each time)
+ gfxQueueASync list_head; // The list of items
} GListObject;
#ifdef __cplusplus
@@ -52,6 +55,8 @@ extern "C" {
GHandle gwinListCreate(GListObject *widget, GWidgetInit *pInit);
+int gwinListAddItem(GHandle gh, const char* item, bool_t useAlloc);
+
#ifdef __cplusplus
}
#endif