wlmaker
|
#include <libbase/libbase.h>
#include <stdbool.h>
#include <stddef.h>
#include <wayland-server-core.h>
#include "box.h"
#include "element.h"
#include "menu_item.h"
#include "pane.h"
#include "style.h"
Go to the source code of this file.
Classes | |
struct | wlmtk_menu_style_t |
struct | wlmtk_menu_events_t |
Typedefs | |
typedef struct _wlmtk_menu_t | wlmtk_menu_t |
Enumerations | |
enum | wlmtk_menu_mode { WLMTK_MENU_MODE_NORMAL , WLMTK_MENU_MODE_RIGHTCLICK } |
Variables | |
const bs_test_case_t | wlmtk_menu_test_cases [] |
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_t wlmtk_menu_t |
Forward declaration: Menu handle.
enum wlmtk_menu_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 | ) |
wlmtk_menu_item_t * wlmtk_menu_get_parent_item | ( | wlmtk_menu_t * | menu_ptr | ) |
bool wlmtk_menu_is_open | ( | wlmtk_menu_t * | menu_ptr | ) |
wlmtk_menu_item_t * wlmtk_menu_item_at | ( | wlmtk_menu_t * | menu_ptr, |
size_t | i | ||
) |
menu_ptr | |
i |
size_t wlmtk_menu_items_size | ( | wlmtk_menu_t * | menu_ptr | ) |
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 |
|
protected |
Registers menu_item_ptr
as this submenu's parent item.
Must be called only from wlmtk_menu_item_set_submenu.
menu_ptr | |
menu_item_ptr |
|
extern |
Unit test cases.