Constructor

GioMenuItemnew_submenu

Declaration

GMenuItem*
g_menu_item_new_submenu (
  const gchar* label,
  GMenuModel* submenu
)

Description

Creates a new GMenuItem representing a submenu.

This is a convenience API around g_menu_item_new() and g_menu_item_set_submenu().

Available since:2.32

Parameters

label const gchar*
 

The section label, or NULL.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
submenu GMenuModel
 

A GMenuModel with the items of the submenu.

 The data is owned by the caller of the function.

Return value

Returns: GMenuItem
 

A new GMenuItem.

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