BeRTOS
Functions
menu.c File Reference

General pourpose menu handling functions. More...

#include "menu.h"
#include "cfg/cfg_menu.h"
#include "cfg/cfg_arch.h"
#include <cfg/compiler.h>
#include <cfg/debug.h>
#include <gfx/gfx.h>
#include <gfx/font.h>
#include <gfx/text.h>
#include <cpu/power.h>
#include <drv/kbd.h>
#include <string.h>

Go to the source code of this file.

Functions

static int menu_count (const struct Menu *menu)
 Return the total number of items in in a menu.
static void menu_layout (const struct Menu *menu, int first_item, int selected, bool redraw)
 Show a menu on the display.
static iptr_t menu_doselect (const struct Menu *menu, struct MenuItem *item)
 Handle menu item selection.
static int menu_next_visible_item (const struct Menu *menu, int index)
 Return the next visible item (rolls back to the first item)
static int menu_prev_visible_item (const struct Menu *menu, int index)
 Return the previous visible item (rolls back to the last item)
iptr_t menu_handle (const struct Menu *menu)
 Handle a menu and invoke hook functions for the selected menu items.
int menu_setFlags (struct Menu *menu, int idx, int flags)
 Set flags on a menuitem.
int menu_clearFlags (struct Menu *menu, int idx, int flags)
 Clear flags on a menuitem.

Detailed Description

General pourpose menu handling functions.

Author:
Bernie Innocenti <bernie@codewiz.org>
Stefano Fedrigo <aleph@develer.com>

Definition in file menu.c.