Class MenuItem
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
IntPtrTransfer ownership: None Nullable: False
attribute
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
expectedType
VariantTypeHandleTransfer 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
GetLink(IntPtr, NonNullableUtf8StringHandle)
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
IntPtrTransfer ownership: None Nullable: False
link
NonNullableUtf8StringHandleTransfer 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
NullableUtf8StringHandleTransfer ownership: None Nullable: True
detailedAction
NullableUtf8StringHandleTransfer 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
IntPtrTransfer ownership: None Nullable: False
itemIndex
intTransfer 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
NullableUtf8StringHandleTransfer ownership: None Nullable: True
section
IntPtrTransfer 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
NullableUtf8StringHandleTransfer ownership: None Nullable: True
submenu
IntPtrTransfer 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
IntPtrTransfer ownership: None Nullable: False
action
NullableUtf8StringHandleTransfer ownership: None Nullable: True
targetValue
VariantHandleTransfer 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
IntPtrTransfer ownership: None Nullable: False
attribute
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
value
VariantHandleTransfer 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
IntPtrTransfer ownership: None Nullable: False
detailedAction
NonNullableUtf8StringHandleTransfer 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
IntPtrTransfer ownership: None Nullable: False
icon
IntPtrTransfer 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
IntPtrTransfer ownership: None Nullable: False
label
NullableUtf8StringHandleTransfer ownership: None Nullable: True
SetLink(IntPtr, NonNullableUtf8StringHandle, IntPtr)
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
IntPtrTransfer ownership: None Nullable: False
link
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
model
IntPtrTransfer 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
IntPtrTransfer ownership: None Nullable: False
section
IntPtrTransfer 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)