2002-04-26 00:00:31 +00:00
|
|
|
/*
|
|
|
|
|
* menuscreens.h
|
|
|
|
|
* This file is part of LCDd, the lcdproc server.
|
|
|
|
|
*
|
|
|
|
|
* This file is released under the GNU General Public License. Refer to the
|
|
|
|
|
* COPYING file distributed with this package.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 1999, William Ferrell, Scott Scriven
|
2003-02-27 21:20:20 +00:00
|
|
|
* 2003, Joris Robijn
|
|
|
|
|
*
|
2002-04-26 00:00:31 +00:00
|
|
|
*
|
|
|
|
|
* Creates all menuscreens, menus and handles the keypresses for the
|
|
|
|
|
* menuscreens.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef MENUSCREENS_H
|
|
|
|
|
#define MENUSCREENS_H
|
|
|
|
|
|
|
|
|
|
#include "menu.h"
|
2002-07-09 22:56:05 +00:00
|
|
|
#include "menuitem.h"
|
2002-05-26 19:21:23 +00:00
|
|
|
#include "screen.h"
|
2002-04-26 00:00:31 +00:00
|
|
|
|
2002-05-26 19:21:23 +00:00
|
|
|
extern Screen * menuscreen;
|
2002-06-28 23:35:55 +00:00
|
|
|
extern Menu * main_menu;
|
2002-05-26 19:21:23 +00:00
|
|
|
|
2002-08-04 20:58:51 +00:00
|
|
|
int menuscreens_init();
|
|
|
|
|
|
|
|
|
|
int menuscreens_shutdown();
|
2002-05-26 19:21:23 +00:00
|
|
|
|
|
|
|
|
bool is_menu_key (char * key);
|
|
|
|
|
/* This function indicates to the input part whether this key was the
|
|
|
|
|
* reserved menu key.
|
|
|
|
|
*/
|
|
|
|
|
|
2002-07-09 22:56:05 +00:00
|
|
|
void menuscreen_inform_item_destruction (MenuItem * item);
|
|
|
|
|
/* Meant for other parts of the program to inform the menuscreen that the
|
|
|
|
|
* item is about to be removed.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
void menuscreen_inform_item_modified (MenuItem * item);
|
|
|
|
|
/* Meant for other parts of the program to inform the menuscreen that some
|
|
|
|
|
* properties of the item have been modified.
|
|
|
|
|
*/
|
|
|
|
|
|
2002-05-26 19:21:23 +00:00
|
|
|
void menuscreen_key_handler (char *key);
|
|
|
|
|
/* This handler handles the keypresses for the menu.
|
|
|
|
|
*/
|
2002-04-26 00:00:31 +00:00
|
|
|
|
2002-06-28 23:35:55 +00:00
|
|
|
void menuscreen_add_screen (Screen * s);
|
|
|
|
|
/* Adds a menu for the given screen */
|
2002-04-29 23:27:24 +00:00
|
|
|
|
2002-06-28 23:35:55 +00:00
|
|
|
void menuscreen_remove_screen (Screen * s);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Removes the menu of the given screen */
|
|
|
|
|
|
|
|
|
|
int menuscreen_goto (Menu * menu);
|
2002-06-28 23:35:55 +00:00
|
|
|
|
|
|
|
|
#endif
|