From 57eeb16aba2613c1329eafbf7d7453cd67f2cc69 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Thu, 25 Jul 2013 19:15:51 +0200 Subject: list widget - work in progress --- include/gos/linux.h | 1 + include/gwin/list.h | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'include') 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 +#include #include #include 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 -- cgit v1.2.3