wlmaker
|
#include "menu.h"
#include <libbase/libbase.h>
#include <linux/input-event-codes.h>
#include <stdlib.h>
#include "input.h"
Classes | |
struct | _wlmtk_menu_t |
Variables | |
static const wlmtk_element_vmt_t | _wlmtk_menu_element_vmt |
const bs_test_case_t | wlmtk_menu_test_cases [] |
static const wlmtk_menu_style_t | _test_style |
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.
|
static |
Wraps to dtor. Implements wlmtk_element_vmt_t::destroy.
|
static |
If the menu is in right-click mode, acts on right-button events and signals the menu to close.
Implementation of wlmtk_element_vmt_t::pointer_button.
element_ptr | |
button_event_ptr |
|
static |
Callback for bs_dllist_for_each: Removes item from items, destroys it.
|
static |
Callback for bs_dllist_for_each: Sets the menu mode for the item.
dlnode_ptr | |
ud_ptr |
|
static |
Tests that pointer moves highlight the items.
|
static |
Tests setting the menu's mode.
void wlmtk_menu_add_item | ( | wlmtk_menu_t * | menu_ptr, |
wlmtk_menu_item_t * | menu_item_ptr | ||
) |
Adds a menu item to the menu.
menu_ptr | |
menu_item_ptr |
wlmtk_menu_t * wlmtk_menu_create | ( | const wlmtk_menu_style_t * | style_ptr | ) |
Creates a menu.
style_ptr |
void wlmtk_menu_destroy | ( | wlmtk_menu_t * | menu_ptr | ) |
Destroys the menu.
menu_ptr |
wlmtk_element_t * wlmtk_menu_element | ( | wlmtk_menu_t * | menu_ptr | ) |
wlmtk_menu_events_t * wlmtk_menu_events | ( | wlmtk_menu_t * | menu_ptr | ) |
enum wlmtk_menu_mode wlmtk_menu_get_mode | ( | wlmtk_menu_t * | menu_ptr | ) |
bool wlmtk_menu_is_open | ( | wlmtk_menu_t * | menu_ptr | ) |
wlmtk_pane_t * wlmtk_menu_pane | ( | wlmtk_menu_t * | menu_ptr | ) |
void wlmtk_menu_remove_item | ( | wlmtk_menu_t * | menu_ptr, |
wlmtk_menu_item_t * | menu_item_ptr | ||
) |
Removes a menu item from the menu.
menu_ptr | |
menu_item_ptr |
void wlmtk_menu_request_item_highlight | ( | wlmtk_menu_t * | menu_ptr, |
wlmtk_menu_item_t * | menu_item_ptr | ||
) |
Requests that menu_item_ptr be highlighted.
menu_ptr | |
menu_item_ptr |
void wlmtk_menu_set_mode | ( | wlmtk_menu_t * | menu_ptr, |
enum wlmtk_menu_mode | mode | ||
) |
Sets the mode of the menu.
menu_ptr | |
mode |
void wlmtk_menu_set_open | ( | wlmtk_menu_t * | menu_ptr, |
bool | opened | ||
) |
Opens the menu: Makes it visible or invisible, and resets state if needed.
menu_ptr | |
opened |
|
static |
For tests: Meu style to apply.
|
static |
The superclass' element virtual method table.
const bs_test_case_t wlmtk_menu_test_cases[] |
Unit test cases.