export_menu_model
Description:
[ Version ( since = "2.32" ) ]
public uint export_menu_model (string object_path, MenuModel menu) throws Error
public uint export_menu_model (string object_path, MenuModel menu) throws Error
Exports menu
on this at object_path
.
The implemented D-Bus API should be considered private. It is subject to change in the future.
An object path can only have one menu model exported on it. If this constraint is violated, the export will fail and 0 will be returned (with throws set accordingly).
Exporting menus with sections containing more than g_menu_exporter_max_section_size items is not supported and results in undefined behavior.
You can unexport the menu model using unexport_menu_model with the return value of this function.
Parameters:
this | |
object_path |
a D-Bus object path |
menu |
Returns:
the ID of the export (never zero), or 0 in case of failure |