wlmaker
Loading...
Searching...
No Matches
Functions | Variables
menu.c File Reference
#include "menu.h"
#include "style.h"
Include dependency graph for menu.c:

Functions

static void _wlmtk_menu_eliminate_item (bs_dllist_node_t *dlnode_ptr, void *ud_ptr)
 
bool wlmtk_menu_init (wlmtk_menu_t *menu_ptr, const wlmtk_menu_style_t *style_ptr, wlmtk_env_t *env_ptr)
 
void wlmtk_menu_fini (wlmtk_menu_t *menu_ptr)
 
wlmtk_element_twlmtk_menu_element (wlmtk_menu_t *menu_ptr)
 
void wlmtk_menu_add_item (wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr)
 
void wlmtk_menu_remove_item (wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr)
 
static void test_add_remove (bs_test_t *test_ptr)
 

Variables

const bs_test_case_t wlmtk_menu_test_cases []
 

Detailed Description

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.

Function Documentation

◆ _wlmtk_menu_eliminate_item()

void _wlmtk_menu_eliminate_item ( bs_dllist_node_t * dlnode_ptr,
void * ud_ptr )
static

Callback for bs_dllist_for_each: Removes item from items, destroys it.

◆ test_add_remove()

void test_add_remove ( bs_test_t * test_ptr)
static

Tests adding and removing menu items.

◆ wlmtk_menu_add_item()

void wlmtk_menu_add_item ( wlmtk_menu_t * menu_ptr,
wlmtk_menu_item_t * menu_item_ptr )

Adds a menu item to the menu.

Parameters
menu_ptr
menu_item_ptr

◆ wlmtk_menu_element()

wlmtk_element_t * wlmtk_menu_element ( wlmtk_menu_t * menu_ptr)
Returns
pointer to the menu's wlmtk_element_t superclass.

◆ wlmtk_menu_fini()

void wlmtk_menu_fini ( wlmtk_menu_t * menu_ptr)

Uninitializes the menu.

Parameters
menu_ptr

◆ wlmtk_menu_init()

bool wlmtk_menu_init ( wlmtk_menu_t * menu_ptr,
const wlmtk_menu_style_t * style_ptr,
wlmtk_env_t * env_ptr )

Initializes the menu.

Parameters
menu_ptr
style_ptr
env_ptr
Returns
true on success.

◆ wlmtk_menu_remove_item()

void wlmtk_menu_remove_item ( wlmtk_menu_t * menu_ptr,
wlmtk_menu_item_t * menu_item_ptr )

Removes a menu item from the menu.

Parameters
menu_ptr
menu_item_ptr

Variable Documentation

◆ wlmtk_menu_test_cases

const bs_test_case_t wlmtk_menu_test_cases[]
Initial value:
= {
{ 1, "add_remove", test_add_remove },
{ 0, NULL, NULL }
}
static void test_add_remove(bs_test_t *test_ptr)
Definition menu.c:132

Unit test cases.