Constructor

GioMenuItemnew_from_model

Declaration

GMenuItem*
g_menu_item_new_from_model (
  GMenuModel* model,
  gint item_index
)

Description

Creates a GMenuItem as an exact copy of an existing menu item in a GMenuModel.

item_index must be valid (ie: be sure to call g_menu_model_get_n_items() first).

Available since:2.34

Parameters

model GMenuModel
 

A GMenuModel.

 The data is owned by the caller of the function.
item_index gint
 

The index of an item in model.

Return value

Returns: GMenuItem
 

A new GMenuItem.

 The caller of the function takes ownership of the data, and is responsible for freeing it.