Files
RedBear-OS/local/recipes/tui/mc/source/lib/widget/menu.h
T
vasilito cee25393d8 fix: boot process improvements — dependency cycle, INIT_NOTIFY, probing loop, and log spam fixes
- Fix P15-8-init-cycle-detection.patch: replace visiting+error with seen+silent-skip
  to eliminate 11 false-positive 'dependency cycle detected' errors on shared deps
- Fix P0-daemon-fix-init-notify-unwrap.patch: remove eprintln! for missing
  INIT_NOTIFY (expected for oneshot_async services, ~7 daemons affected)
- Fix driver-manager hotplug loop: add PERMANENTLY_SKIPPED static set shared
  between hotplug handler and DriverConfig::probe() to stop infinite re-probing
  of Fatal/NotSupported/deferred-exhausted device+driver pairs (e.g. ided)
- Fix driver-manager log_timeline: suppress repeated EPIPE/ENOENT errors with
  AtomicI32 dedup and AtomicBool one-shot guards for boot timeline JSON
- Add driver-manager SIGTERM handler, ACPI bus registration, --status mode,
  driver reap loop, graceful shutdown, and reduced deferred retries (30→3)
2026-05-17 12:34:02 +03:00

64 lines
1.9 KiB
C

/*
Header file for pulldown menu engine for Midnignt Commander
*/
/** \file menu.h
* \brief Header: pulldown menu code
*/
#ifndef MC__WIDGET_MENU_H
#define MC__WIDGET_MENU_H
/*** typedefs(not structures) and defined constants **********************************************/
#define MENUBAR(x) ((WMenuBar *)(x))
#define menu_separator_new() NULL
/*** enums ***************************************************************************************/
/*** structures declarations (and typedefs of structures)*****************************************/
struct menu_entry_t;
typedef struct menu_entry_t menu_entry_t;
struct menu_t;
typedef struct menu_t menu_t;
/* The button bar menu */
typedef struct WMenuBar
{
Widget widget;
gboolean is_dropped; /* If the menubar has dropped */
GList *menu; /* The actual menus */
guint current; /* Current menu on the top bar */
unsigned long previous_widget; /* Selected widget ID before activating menu */
} WMenuBar;
/*** global variables defined in .c file *********************************************************/
extern const global_keymap_t *menu_map;
/*** declarations of public functions ************************************************************/
menu_entry_t *menu_entry_new (const char *name, long command);
void menu_entry_free (menu_entry_t * me);
menu_t *menu_new (const char *name, GList * entries, const char *help_node);
void menu_set_name (menu_t * menu, const char *name);
void menu_free (menu_t * menu);
WMenuBar *menubar_new (GList * menu);
void menubar_set_menu (WMenuBar * menubar, GList * menu);
void menubar_add_menu (WMenuBar * menubar, menu_t * menu);
void menubar_arrange (WMenuBar * menubar);
WMenuBar *menubar_find (const WDialog * h);
void menubar_activate (WMenuBar * menubar, gboolean dropped, int which);
/*** inline functions ****************************************************************************/
#endif /* MC__WIDGET_MENU_H */