|
wlmaker
|
#include <libbase/libbase.h>#include <libbase/plist.h>#include <stdbool.h>#include <stdint.h>#include <wayland-server-core.h>#include "element.h"#include "style.h"#include "menu.h"

Go to the source code of this file.
Classes | |
| struct | wlmtk_menu_item_style |
| struct | wlmtk_menu_item_events_t |
Typedefs | |
| typedef struct _wlmtk_menu_item_t | wlmtk_menu_item_t |
Enumerations | |
| enum | wlmtk_menu_item_state_t { WLMTK_MENU_ITEM_ENABLED , WLMTK_MENU_ITEM_HIGHLIGHTED , WLMTK_MENU_ITEM_DISABLED } |
Variables | |
| const bspl_desc_t | wlmtk_menu_item_style_desc [] |
| const bs_test_set_t | wlmtk_menu_item_test_set |
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.
| typedef struct _wlmtk_menu_item_t wlmtk_menu_item_t |
Forward declaration: State of the menu item.
States a menu item can be in.
| bs_dllist_node_t * wlmtk_dlnode_from_menu_item | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
Returns pointer to wlmtk_menu_item_t::dlnode.
| wlmtk_menu_item_t * wlmtk_menu_item_create | ( | wlmtk_menu_style_ref_t * | style_ref_ptr | ) |
Creates a menu item.
Note: Menu items are created as 'visible' elements.
| style_ref_ptr | Reference of the menu's style. |
| void wlmtk_menu_item_destroy | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
Destroys the menu item.
| menu_item_ptr |
| wlmtk_element_t * wlmtk_menu_item_element | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
Returns a pointer to the superclass wlmtk_element_t.
| wlmtk_menu_item_events_t * wlmtk_menu_item_events | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
Returns pointer to the menu item's wlmtk_menu_item_t::events.
| wlmtk_menu_item_t * wlmtk_menu_item_from_dlnode | ( | bs_dllist_node_t * | dlnode_ptr | ) |
Returns the base wlmtk_menu_item_t from dlnode_ptr.
| enum wlmtk_menu_mode wlmtk_menu_item_get_mode | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
| wlmtk_menu_item_state_t wlmtk_menu_item_get_state | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
| wlmtk_menu_t * wlmtk_menu_item_get_submenu | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
Returns the submenu for this menu item.
| menu_item_ptr |
| void wlmtk_menu_item_set_enabled | ( | wlmtk_menu_item_t * | menu_item_ptr, |
| bool | enabled | ||
| ) |
Sets whether the menu item is enabled or disabled.
| menu_item_ptr | |
| enabled |
| bool wlmtk_menu_item_set_highlighted | ( | wlmtk_menu_item_t * | menu_item_ptr, |
| bool | highlighted | ||
| ) |
Sets the menu item as highlighted.
| menu_item_ptr | |
| highlighted |
| void wlmtk_menu_item_set_mode | ( | wlmtk_menu_item_t * | menu_item_ptr, |
| enum wlmtk_menu_mode | mode | ||
| ) |
Sets the menu's mode for this item.
| menu_item_ptr | |
| mode |
| void wlmtk_menu_item_set_parent_menu | ( | wlmtk_menu_item_t * | menu_item_ptr, |
| wlmtk_menu_t * | menu_ptr | ||
| ) |
Sets the menu this item belongs to.
Private: Should only be called by wlmtk_menu_add_item.
| menu_item_ptr | |
| menu_ptr | May be NULL, to detach from menu. |
| bool wlmtk_menu_item_set_style | ( | wlmtk_menu_item_t * | menu_item_ptr, |
| wlmtk_menu_style_ref_t * | style_ref_ptr | ||
| ) |
Udpates the style of this item.
| menu_item_ptr | |
| style_ref_ptr | Reference of the menu's style. |
| void wlmtk_menu_item_set_submenu | ( | wlmtk_menu_item_t * | menu_item_ptr, |
| wlmtk_menu_t * | submenu_ptr | ||
| ) |
Sets the submenu for this menu item.
| menu_item_ptr | |
| submenu_ptr | The submenu to set for the item. The item will take ownership of submenu_ptr, and destroy it when the item ist destroyed. Unless the submenu is detached again, by calling with a NULL argument. |
| bool wlmtk_menu_item_set_text | ( | wlmtk_menu_item_t * | menu_item_ptr, |
| const char * | text_ptr | ||
| ) |
Sets or updates the text for the menu item.
| menu_item_ptr | |
| text_ptr |
| void wlmtk_menu_item_trigger | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
Triggers the menu item's action.
| menu_item_ptr |
|
extern |
Descriptor for decoding the "Item" style dictionary.
|
extern |
Unit test cases.