#include "list.h"
#include "UW_Config.h"
Data Structures | |
struct | tstrTimer |
struct | UW_CallBack |
struct | UW_Window |
struct | UW_ListBox |
Defines | |
#define | DEFAULT_FORM_LENGTH 160 |
#define | DEFAULT_FORM_HEIGHT 104 |
#define | DEFAULT_BTN_LENGTH 16 |
#define | DEFAULT_BTN_HEIGHT 16 |
#define | DEFAULT_EDIT_LENGTH 16 |
#define | DEFAULT_EDIT_HEIGHT 16 |
#define | DEFAULT_CHECK_LENGTH 16 |
#define | DEFAULT_CHECK_HEIGHT 16 |
#define | DEFAULT_LABEL_LENGTH 16 |
#define | DEFAULT_LABEL_HEIGHT 16 |
#define | DEFAULT_LIST_LENGTH 16 |
#define | DEFAULT_LIST_HEIGHT 16 |
#define | DEFAULT_ICON_LENGTH 32 |
#define | DEFAULT_ICON_HEIGHT 32 |
#define | DEFAULT_FADER_LENGTH 4 |
#define | DEFAULT_FADER_HEIGHT 32 |
#define | DEFAULT_POT_LENGTH 8 |
#define | DEFAULT_POT_HEIGHT 8 |
#define | RGB_MAKE(xR, xG, xB) |
#define | RGB_RED 0x00F8 |
#define | RGB_BLACK 0x0000 |
#define | RGB_WHITE 0xffff |
#define | RGB_BLUE 0x1F00 |
#define | RGB_GREEN 0xE007 |
#define | RGB_YELLOW (RGB_GREEN|RGB_RED) |
#define | RGB_MAGENTA (RGB_BLUE|RGB_RED) |
#define | RGB_LIGHTBLUE (RGB_BLUE|RGB_GREEN) |
#define | RGB_ORANGE (RGB_RED | 0xE001) |
#define | RGB_PINK (RGB_MAGENTA | 0xE001) |
#define | GRAY (RGB_MAKE(180,180,180)) |
#define | BLUE (RGB_BLUE) |
#define | RED (RGB_RED) |
#define | BLACK (RGB_BLACK) |
#define | WHITE (RGB_WHITE) |
#define | SIMPLE_BLACK 0x00 |
#define | SIMPLE_BLUE 0x01 |
#define | SIMPLE_GRAY 0x02 |
#define | SIMPLE_WHITE 0x03 |
#define | CH_WIDTH 0x07 |
#define | CH_HEIGHT 0x10 |
#define | UW_SetType(pWindow, Type) (pWindow->type = Type) |
#define | UW_SetPosition(pWindow, x, y) |
#define | UW_SetSize(pWindow, x, y) |
#define | UW_SetCaption(pWindow, pcaption, length) |
#define | UW_SetVisible(pWindow, vvisible) |
#define | UW_SetEnable(pWindow, value) |
#define | UW_SetOnClick(pWindow, pFunction) |
#define | UW_SetOnButtonPress(pWindow, pFunction) |
#define | UW_SetTimer(pWindow, pFunction, Duration) |
#define | UW_SetValue(pCheckBox, vvalue) |
Enumerations | |
enum | UW_Type { UW_FORM = 0, UW_BUTTON = 1, UW_LABEL = 2, UW_EDIT = 3, UW_CHECKBOX = 4, UW_ICON = 5, UW_LISTBOX = 6, UW_FADER = 100, UW_POT = 101, UW_ENVELOPE = 102 } |
enum | UW_ButtonState { PUSHED = 0, LEFT = 1, UP = 2, RIGHT = 3, DOWN = 4 } |
enum | MENU_code { MENU_LEAVE = 0, MENU_CONTINUE = 1, MENU_REFRESH = 2, MENU_CHANGE = 3, MENU_CONTINUE_COMMAND = 4, MENU_LEAVE_AS_IT = 5, MENU_RESTORE_COMMAND = 6 } |
Functions | |
void | UW_ListBoxSetItemHeight (UW_Window *pListBox, u8 value) |
API Set List Box Items Height. | |
void | UW_ListBoxAddItem (UW_Window *ListBox, UW_Window *Item) |
API add item to list box. | |
void | UW_ListBoxRemoveItem (UW_Window *ListBox, UW_Window *Item) |
API remove item from list box. | |
UW_Window * | UW_ListBoxGetActiveItem (UW_Window *ListBox) |
get active item | |
UW_Window * | UW_ListBoxGetItem (UW_Window *ListBox, u32 index) |
get item with a certain index | |
s32 | UW_ListBoxGetIndex (UW_Window *ListBox, UW_Window *Item) |
void | ialloc () |
char * | UW_Malloc (unsigned long nbytes) |
void | UW_Free (char *ap) |
void * | UW_MemCpy (void *s1, const void *s2, int n) |
void * | UW_MemSet (void *s1, unsigned char val, int n) |
Variables | |
UW_Window | UWindows |
UW_Window * | pUW_Infocus |
bool | Refresh |
#define BLACK (RGB_BLACK) |
#define BLUE (RGB_BLUE) |
#define CH_HEIGHT 0x10 |
#define CH_WIDTH 0x07 |
#define DEFAULT_BTN_HEIGHT 16 |
#define DEFAULT_BTN_LENGTH 16 |
#define DEFAULT_CHECK_HEIGHT 16 |
#define DEFAULT_CHECK_LENGTH 16 |
#define DEFAULT_EDIT_HEIGHT 16 |
#define DEFAULT_EDIT_LENGTH 16 |
#define DEFAULT_FADER_HEIGHT 32 |
#define DEFAULT_FADER_LENGTH 4 |
#define DEFAULT_FORM_HEIGHT 104 |
#define DEFAULT_FORM_LENGTH 160 |
#define DEFAULT_ICON_HEIGHT 32 |
#define DEFAULT_ICON_LENGTH 32 |
#define DEFAULT_LABEL_HEIGHT 16 |
#define DEFAULT_LABEL_LENGTH 16 |
#define DEFAULT_LIST_HEIGHT 16 |
#define DEFAULT_LIST_LENGTH 16 |
#define DEFAULT_POT_HEIGHT 8 |
#define DEFAULT_POT_LENGTH 8 |
#define GRAY (RGB_MAKE(180,180,180)) |
#define RED (RGB_RED) |
#define RGB_BLACK 0x0000 |
#define RGB_BLUE 0x1F00 |
#define RGB_GREEN 0xE007 |
#define RGB_LIGHTBLUE (RGB_BLUE|RGB_GREEN) |
#define RGB_MAGENTA (RGB_BLUE|RGB_RED) |
#define RGB_MAKE | ( | xR, | |||
xG, | |||||
xB | ) |
( ( (xG&0x07)<<13 ) + ( (xG)>>5 ) + \ ( ((xB)>>3) << 8 ) + \ ( ((xR)>>3) << 3 ) )
#define RGB_ORANGE (RGB_RED | 0xE001) |
#define RGB_PINK (RGB_MAGENTA | 0xE001) |
#define RGB_RED 0x00F8 |
#define RGB_WHITE 0xffff |
#define RGB_YELLOW (RGB_GREEN|RGB_RED) |
#define SIMPLE_BLACK 0x00 |
#define SIMPLE_BLUE 0x01 |
#define SIMPLE_GRAY 0x02 |
#define SIMPLE_WHITE 0x03 |
#define UW_SetCaption | ( | pWindow, | |||
pcaption, | |||||
length | ) |
#define UW_SetEnable | ( | pWindow, | |||
value | ) |
do \ { \ (pWindow)->enable = (bool)value; \ Refresh = 1; \ } while(0)
#define UW_SetOnButtonPress | ( | pWindow, | |||
pFunction | ) |
do \ { \ (pWindow)->CallBacks.ButtonPress = pFunction; \ } while(0)
#define UW_SetOnClick | ( | pWindow, | |||
pFunction | ) |
do \ { \ (pWindow)->CallBacks.Click = (void *)pFunction; \ } while(0)
#define UW_SetPosition | ( | pWindow, | |||
x, | |||||
y | ) |
#define UW_SetSize | ( | pWindow, | |||
x, | |||||
y | ) |
#define UW_SetTimer | ( | pWindow, | |||
pFunction, | |||||
Duration | ) |
do \ { \ (pWindow)->CallBacks.TimerCallBack.u32TimeOut = Duration; \ (pWindow)->CallBacks.TimerCallBack.u32CurrentTime = 0; \ (pWindow)->CallBacks.TimerCallBack.Timer = pFunction; \ } while(0)
#define UW_SetType | ( | pWindow, | |||
Type | ) | (pWindow->type = Type) |
#define UW_SetValue | ( | pCheckBox, | |||
vvalue | ) |
do \ { \ (pCheckBox)->value = vvalue; \ Refresh = 1; \ } while(0)
#define UW_SetVisible | ( | pWindow, | |||
vvisible | ) |
do \ { \ (pWindow)->visible = (bool)vvisible; \ Refresh = 1; \ } while(0)
#define WHITE (RGB_WHITE) |
enum MENU_code |
enum UW_ButtonState |
enum UW_Type |
void ialloc | ( | ) |
void UW_Free | ( | char * | ap | ) |
API add item to list box.
This is used add item to list box
[in] | pListBox,: | pointer to UWindow Object treated as ListBox |
[in] | Item,: | a new Item, pointer t UWindow treated as EditBox |
get active item
This is used get current item currently pointed to in ListBox
[in] | pListBox,: | pointer to UWindow Object treated as ListBox |
get item with a certain index
Items are indexed from 0 to TotalCount-1, This is used get item with certain index
[in] | pListBox,: | pointer to UWindow Object treated as ListBox |
[in] | index,: | index of the Item |
API remove item from list box.
This is used remove item from list box
[in] | pListBox,: | pointer to UWindow Object treated as ListBox |
[in] | Item,: | a new Item, pointer t UWindow treated as EditBox |
API Set List Box Items Height.
This should set List Box Items Height
[in] | pListBox,: | pointer to UWindow Object treated as ListBox |
[in] | value | : Height of Items |
char* UW_Malloc | ( | unsigned long | nbytes | ) |
void* UW_MemCpy | ( | void * | s1, | |
const void * | s2, | |||
int | n | |||
) |
void* UW_MemSet | ( | void * | s1, | |
unsigned char | val, | |||
int | n | |||
) |
bool Refresh |