diff --git a/README.md b/README.md index 406a5f9..f261932 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ struct tray_menu { void (*cb)(struct tray_menu *); void *context; + + struct tray_menu *submenu; }; ``` @@ -69,6 +71,9 @@ struct tray_menu { All functions are meant to be called from the UI thread only. +Menu arrays must be terminated with a NULL item, e.g. the last item in the +array must have text field set to NULL. + ## Roadmap * [x] Cross-platform tray icon @@ -76,7 +81,7 @@ All functions are meant to be called from the UI thread only. * [x] Separators in the menu * [x] Disabled/enabled menu items * [x] Checked/unchecked menu items -* [ ] Nested menus +* [x] Nested menus * [ ] Icons for menu items * [ ] Rewrite ObjC code in C using ObjC Runtime (now ObjC code breaks many linters and static analyzers) * [ ] Call GTK code using dlopen/dlsym (to make binaries run safely if Gtk libraries are not available)