Gio.MenuItem
Description: Reference for Gio.MenuItem

### Class

# GioMenuItem

since: 2.32

#### Description

    final class Gio.MenuItem : GObject.Object
    {
      /* No available fields */
    }

`GMenuItem` is an opaque structure type. You must access it using the functions below.

Available since: 2.32

#### Ancestors

- GObject

#### Constructors

###### g_menu_item_new

Creates a new `GMenuItem`.

since: 2.32

###### g_menu_item_new_from_model

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

since: 2.34

###### g_menu_item_new_section

Creates a new `GMenuItem` representing a section.

since: 2.32

###### g_menu_item_new_submenu

Creates a new `GMenuItem` representing a submenu.

since: 2.32

#### Instance methods

###### g_menu_item_get_attribute

Queries the named `attribute` on `menu_item`.

since: 2.34

###### g_menu_item_get_attribute_value

Queries the named `attribute` on `menu_item`.

since: 2.34

###### g_menu_item_get_link

Queries the named `link` on `menu_item`.

since: 2.34

###### g_menu_item_set_action_and_target

Sets or unsets the “action” and “target” attributes of `menu_item`.

since: 2.32

###### g_menu_item_set_action_and_target_value

Sets or unsets the “action” and “target” attributes of `menu_item`.

since: 2.32

###### g_menu_item_set_attribute

Sets or unsets an attribute on `menu_item`.

since: 2.32

###### g_menu_item_set_attribute_value

Sets or unsets an attribute on `menu_item`.

since: 2.32

###### g_menu_item_set_detailed_action

Sets the “action” and possibly the “target” attribute of `menu_item`.

since: 2.32

###### g_menu_item_set_icon

Sets (or unsets) the icon on `menu_item`.

since: 2.38

###### g_menu_item_set_label

Sets or unsets the “label” attribute of `menu_item`.

since: 2.32

###### g_menu_item_set_link

Creates a link from `menu_item` to `model` if non-`NULL`, or unsets it.

since: 2.32

###### g_menu_item_set_section

Sets or unsets the “section” link of `menu_item` to `section`.

since: 2.32

###### g_menu_item_set_submenu

Sets or unsets the “submenu” link of `menu_item` to `submenu`.

since: 2.32

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

since: 2.0