--- lbbs/include/menu.h 2025/04/28 03:30:59 1.9 +++ lbbs/include/menu.h 2025/05/06 05:31:26 1.12 @@ -1,16 +1,15 @@ /*************************************************************************** menu.h - description ------------------- - begin : Wed Mar 16 2004 - copyright : (C) 2005 by Leaflet - email : leaflet@leafok.com + Copyright : (C) 2004-2025 by Leaflet + Email : leaflet@leafok.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * + * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ @@ -18,6 +17,8 @@ #ifndef _MENU_H_ #define _MENU_H_ +#include "common.h" + #define MAX_MENUITEM_LENGTH 50 #define MAX_MENUITEMS 30 #define MAX_MENUNAME_LENGTH 256 @@ -47,7 +48,7 @@ typedef struct _menu_title MENU_TITLE; struct _menu_screen { int row, col, show; - char filename[256]; + char filename[FILE_PATH_LEN]; }; typedef struct _menu_screen MENU_SCREEN; @@ -74,10 +75,17 @@ typedef struct _menu_set MENU_SET; extern MENU_SET bbs_menu; extern int load_menu(MENU_SET *p_menu_set, const char *conf_file); + extern void unload_menu(MENU_SET *p_menu_set); + extern int reload_menu(MENU_SET *p_menu_set); + extern int menu_control(MENU_SET *p_menu_set, int key); + extern int display_menu(MENU *p_menu); + +extern int display_current_menu(MENU_SET *p_menu_set); + extern MENU *get_menu(MENU_SET *p_menu_set, const char *menu_name); #endif //_MENU_H_