This is the Object based object that represents a menu item.
It gets created the same on both the client and the server side and libdbusmenu-glib does the work of making this object model appear on
both sides of DBus. Simple really, though through updates and people coming on and off the bus it can lead to lots of fun complex
scenarios.
- public void @foreach (void* func, void* data)
This calls the function func
on this menu item and all of
the children of this item.
- public bool child_add_position (Menuitem child, uint position)
Puts child
in the list of children for
this at the location specified in position
.
- public bool child_append (Menuitem child)
This function adds child
to the list of children on
this at the end of that list.
- public bool child_delete (Menuitem child)
This function removes child
from the children list of
this.
- public unowned Menuitem child_find (int id)
Search the children of this to find
one with the ID of id
.
- public bool child_prepend (Menuitem child)
This function adds child
to the list of children on
this at the beginning of that list.
- public bool child_reorder (Menuitem child, uint position)
This function moves a child on the list of children.
- public unowned Menuitem find_id (int id)
This function searchs the whole tree of children that are attached to
this.
- public unowned List<Menuitem> get_children ()
Returns simply the list of children that this menu item has.
- public int get_id ()
Gets the unique ID for this.
- public unowned Menuitem get_parent ()
This function looks up the parent of this
- public uint get_position (Menuitem parent)
This function returns the position of the menu item
this in the children of parent
.
- public uint get_position_realized (Menuitem parent)
This function is very similar to
get_position except that it only counts in the children that have
been realized.
- public bool get_root ()
This function returns the internal value of whether this is a root
node or not.
- public virtual void handle_event (string name, Variant variant, uint timestamp)
This function is called to create an event.
- public HashTable<void*,void*> properties_copy ()
This function takes the properties of a Menuitem
and puts them into a GenericSet that is referenced by the key of a string and has the value of a
string.
- public List<unowned string> properties_list ()
This functiong gets a list of the names of all the properties that are
set on this menu item.
- public bool property_exist (string property)
Checkes to see if a particular property exists on
this and returns TRUE
if so.
- public unowned string property_get (string property)
Look up a property on this and
return the value of it if it exits.
- public bool property_get_bool (string property)
Look up a property on this and
return the value of it if it exits.
- public unowned uint8[] property_get_byte_array (string property)
Look up a property on this and
return the value of it if it exits.
- public int property_get_int (string property)
Look up a property on this and
return the value of it if it exits.
- public unowned Variant property_get_variant (string property)
Look up a property on this and
return the value of it if it exits.
- public void property_remove (string property)
Removes a property from the menuitem.
- public bool property_set (string property, string value)
Takes the pair of property
and value
and
places them as a property on this.
- public bool property_set_bool (string property, bool value)
Takes a boolean value
and sets it on property
as a property on this.
- public bool property_set_byte_array (string property, uint8 value, size_t nelements)
Takes a byte array value
and sets it on property
as a property on this.
- public bool property_set_int (string property, int value)
Takes a boolean value
and sets it on property
as a property on this.
- public bool property_set_variant (string property, Variant value)
Takes the pair of property
and value
and
places them as a property on this.
- public void send_about_to_show (void* cb, void* cb_data)
This function is used to send the even that the submenu of this item
is about to be shown.
- public bool set_parent (Menuitem parent)
Sets the parent of this to
parent
.
- public void set_root (bool root)
This function sets the internal value of whether this is a root node
or not.
- public List<Menuitem> take_children ()
While the name sounds devious that's exactly what this function does.
- public bool unparent ()
Unparents the menu item this.