Table of Contents

Class MenuItem

Namespace
Gio.Internal
Assembly
Gio-2.0.dll
public class MenuItem
Inheritance
MenuItem
Inherited Members

Methods

GetAttributeValue(IntPtr, NonNullableUtf8StringHandle, VariantTypeHandle)

Calls native method g_menu_item_get_attribute_value. Version: 2.34

[Version("2.34")]
public static extern VariantOwnedHandle GetAttributeValue(IntPtr menuItem, NonNullableUtf8StringHandle attribute, VariantTypeHandle expectedType)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

attribute NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

expectedType VariantTypeHandle

Transfer ownership: None Nullable: True

Returns

VariantOwnedHandle

Transfer ownership: Full Nullable: True

GetGType()

Calls native function g_menu_item_get_type.

public static extern nuint GetGType()

Returns

nuint

Transfer ownership: None Nullable: False

Calls native method g_menu_item_get_link. Version: 2.34

[Version("2.34")]
public static extern IntPtr GetLink(IntPtr menuItem, NonNullableUtf8StringHandle link)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

link NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

Returns

IntPtr

Transfer ownership: Full Nullable: True

New(NullableUtf8StringHandle, NullableUtf8StringHandle)

Calls native constructor g_menu_item_new. Version: 2.32

[Version("2.32")]
public static extern IntPtr New(NullableUtf8StringHandle label, NullableUtf8StringHandle detailedAction)

Parameters

label NullableUtf8StringHandle

Transfer ownership: None Nullable: True

detailedAction NullableUtf8StringHandle

Transfer ownership: None Nullable: True

Returns

IntPtr

Transfer ownership: Full Nullable: False

NewFromModel(IntPtr, int)

Calls native constructor g_menu_item_new_from_model. Version: 2.34

[Version("2.34")]
public static extern IntPtr NewFromModel(IntPtr model, int itemIndex)

Parameters

model IntPtr

Transfer ownership: None Nullable: False

itemIndex int

Transfer ownership: None Nullable: False

Returns

IntPtr

Transfer ownership: Full Nullable: False

NewSection(NullableUtf8StringHandle, IntPtr)

Calls native constructor g_menu_item_new_section. Version: 2.32

[Version("2.32")]
public static extern IntPtr NewSection(NullableUtf8StringHandle label, IntPtr section)

Parameters

label NullableUtf8StringHandle

Transfer ownership: None Nullable: True

section IntPtr

Transfer ownership: None Nullable: False

Returns

IntPtr

Transfer ownership: Full Nullable: False

NewSubmenu(NullableUtf8StringHandle, IntPtr)

Calls native constructor g_menu_item_new_submenu. Version: 2.32

[Version("2.32")]
public static extern IntPtr NewSubmenu(NullableUtf8StringHandle label, IntPtr submenu)

Parameters

label NullableUtf8StringHandle

Transfer ownership: None Nullable: True

submenu IntPtr

Transfer ownership: None Nullable: False

Returns

IntPtr

Transfer ownership: Full Nullable: False

SetActionAndTargetValue(IntPtr, NullableUtf8StringHandle, VariantHandle)

Calls native method g_menu_item_set_action_and_target_value. Version: 2.32

[Version("2.32")]
public static extern void SetActionAndTargetValue(IntPtr menuItem, NullableUtf8StringHandle action, VariantHandle targetValue)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

action NullableUtf8StringHandle

Transfer ownership: None Nullable: True

targetValue VariantHandle

Transfer ownership: None Nullable: True

SetAttributeValue(IntPtr, NonNullableUtf8StringHandle, VariantHandle)

Calls native method g_menu_item_set_attribute_value. Version: 2.32

[Version("2.32")]
public static extern void SetAttributeValue(IntPtr menuItem, NonNullableUtf8StringHandle attribute, VariantHandle value)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

attribute NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

value VariantHandle

Transfer ownership: None Nullable: True

SetDetailedAction(IntPtr, NonNullableUtf8StringHandle)

Calls native method g_menu_item_set_detailed_action. Version: 2.32

[Version("2.32")]
public static extern void SetDetailedAction(IntPtr menuItem, NonNullableUtf8StringHandle detailedAction)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

detailedAction NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

SetIcon(IntPtr, IntPtr)

Calls native method g_menu_item_set_icon. Version: 2.38

[Version("2.38")]
public static extern void SetIcon(IntPtr menuItem, IntPtr icon)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

icon IntPtr

Transfer ownership: None Nullable: False

SetLabel(IntPtr, NullableUtf8StringHandle)

Calls native method g_menu_item_set_label. Version: 2.32

[Version("2.32")]
public static extern void SetLabel(IntPtr menuItem, NullableUtf8StringHandle label)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

label NullableUtf8StringHandle

Transfer ownership: None Nullable: True

Calls native method g_menu_item_set_link. Version: 2.32

[Version("2.32")]
public static extern void SetLink(IntPtr menuItem, NonNullableUtf8StringHandle link, IntPtr model)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

link NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

model IntPtr

Transfer ownership: None Nullable: True

SetSection(IntPtr, IntPtr)

Calls native method g_menu_item_set_section. Version: 2.32

[Version("2.32")]
public static extern void SetSection(IntPtr menuItem, IntPtr section)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

section IntPtr

Transfer ownership: None Nullable: True

SetSubmenu(IntPtr, IntPtr)

Calls native method g_menu_item_set_submenu. Version: 2.32

[Version("2.32")]
public static extern void SetSubmenu(IntPtr menuItem, IntPtr submenu)

Parameters

menuItem IntPtr

Transfer ownership: None Nullable: False

submenu IntPtr

Transfer ownership: None Nullable: True