|
static void | _wlmaker_root_menu_content_request_close (wlmtk_content_t *content_ptr) |
|
static void | _wlmaker_root_menu_content_set_activated (wlmtk_content_t *content_ptr, bool activated) |
|
static void | _wlmaker_root_menu_handle_menu_open_changed (struct wl_listener *listener_ptr, void *data_ptr) |
|
static void | _wlmaker_root_menu_handle_request_close (struct wl_listener *listener_ptr, void *data_ptr) |
|
static bool | _wlmaker_root_menu_init_menu_from_array (wlmtk_menu_t *menu_ptr, bspl_array_t *array_ptr, const wlmtk_menu_style_t *menu_style_ptr, wlmaker_server_t *server_ptr) |
|
static bool | _wlmaker_root_menu_populate_menu_items_from_array (wlmtk_menu_t *menu_ptr, bspl_array_t *array_ptr, const wlmtk_menu_style_t *menu_style_ptr, wlmaker_server_t *server_ptr) |
|
static bool | _wlmaker_root_menu_populate_menu_items_from_file (wlmtk_menu_t *menu_ptr, const char *filename_ptr, const wlmtk_menu_style_t *menu_style_ptr, wlmaker_server_t *server_ptr) |
|
static bool | _wlmaker_root_menu_populate_menu_items_from_generator (wlmtk_menu_t *menu_ptr, const char *command_ptr, const wlmtk_menu_style_t *menu_style_ptr, wlmaker_server_t *server_ptr) |
|
static void | _wlmaker_root_menu_generator_destroy (wlmaker_root_menu_generator_t *gen_menu_ptr) |
|
static void | _wlmaker_root_menu_generator_handle_menu_destroy (struct wl_listener *listener_ptr, void *data_ptr) |
|
static void | _wlmaker_root_menu_generator_handle_terminated (void *userdata_ptr, wlmaker_subprocess_handle_t *subprocess_handle_ptr, int state, int code) |
|
static wlmtk_menu_item_t * | _wlmaker_root_menu_create_item_from_array (bspl_array_t *item_array_ptr, const wlmtk_menu_style_t *menu_style_ptr, wlmaker_server_t *server_ptr) |
|
static wlmtk_menu_item_t * | _wlmaker_root_menu_create_disabled_item (const wlmtk_menu_item_style_t *style_ptr, const char *fmt_ptr,...) __ARG_PRINTF__(2 |
|
wlmaker_root_menu_t * | wlmaker_root_menu_create (wlmaker_server_t *server_ptr, const char *arg_root_menu_file_ptr, const wlmtk_window_style_t *window_style_ptr, const wlmtk_menu_style_t *menu_style_ptr) |
|
void | wlmaker_root_menu_destroy (wlmaker_root_menu_t *root_menu_ptr) |
|
wlmtk_window_t * | wlmaker_root_menu_window (wlmaker_root_menu_t *root_menu_ptr) |
|
wlmtk_menu_t * | wlmaker_root_menu_menu (wlmaker_root_menu_t *root_menu_ptr) |
|
static void | test_default_menu (bs_test_t *test_ptr) |
|
static void | test_generated_menu (bs_test_t *test_ptr) |
|
- Copyright
- Copyright 2024 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Creates a menu item from the Plist array.
The Plist array either defines a menu action item, where the array elements are (Title, ActionName, OptionalActionArg)
. Or, it defines a submenu, as specified in _wlmaker_root_menu_init_menu_from_array.
For the list of permitted ActionName
values, see wlmaker_action_desc.
- Parameters
-
item_array_ptr | |
menu_style_ptr | |
server_ptr | |
- Returns
- The menu item, or NULL on error.
Initializes the menu from the menu configuration array.
The menu configuration is a Plist array. The first item is the menu's title, while the second item defines the nature of the menu configuration:
It can define a set of menu items, in form of Plist arrays:
("Menu Title",
("Item 1", None),
("Item 2", None)
)
Or, it is a definition to include a Plist menu:
("Include", IncludePlistMenu, "tests/data/menu.plist")
Or, it is a definition to generate a Plist menu:
("Include", GeneratePlistMenu, "cat tests/data/menu.plist")
- Parameters
-
menu_ptr | |
array_ptr | |
menu_style_ptr | |
server_ptr | |
- Returns
- true on success.