menu_item_get_sub_item()

Retrieve the sub-menu item inside the menu item.

Synopsis:

#include "bps/menu.h"
 
BPS_API menu_sub_item_t* menu_item_get_sub_item(menu_item_t *item,
                                                int index)

Since:

BlackBerry 10.0.0

Arguments:

item

The menu item to retrieve the sub-menu item from.

index

The index of the sub-menu item inside the menu item.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

The menu_item_get_sub_item() function extracts the sub-menu item at the specific index inside the menu item. The function doesn't copy data and the returned values are released once the bps_get_event() function is called again.

The sub-menu item ownership is not transferred to the application. An application must not call the free function on sub-menu item pointers that are retrieved using the menu_item_get_sub_item() function. The pointer to the sub-menu item is valid until the bps_get_event() function is called again.

Returns:

The pointer to the returned sub-menu item, NULL if item is NULL or the index is out of bounds.