Menuitem
Object Hierarchy:
Description:
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.
All known sub-classes:
Namespace: Dbusmenu
Package: dbusmenu-glib-0.4
Content:
Properties:
Creation methods:
- public Menuitem ()
Create a new Menuitem with all default values.
- public Menuitem.with_id (int id)
This creates a blank Menuitem with a specific ID.
Methods:
- 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 inposition
. - 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
andvalue
and places them as a property on this. - public bool property_set_bool (string property, bool value)
Takes a boolean
value
and sets it onproperty
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 onproperty
as a property on this. - public bool property_set_int (string property, int value)
Takes a boolean
value
and sets it onproperty
as a property on this. - public bool property_set_variant (string property, Variant value)
Takes the pair of
property
andvalue
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.
Signals:
- public virtual signal bool about_to_show ()
Emitted when the submenu for this item is about to be shown
- public virtual signal void child_added (Object position, uint arg2)
Signaled when the child menuitem has been added to the parent.
- public virtual signal void child_moved (Object newpos, uint oldpos, uint arg3)
Signaled when the child menuitem has had its location in the list change.
- public virtual signal void child_removed (Object arg1)
Signaled when the child menuitem has been requested to be removed from the parent.
- public virtual signal bool event (string value, Variant timestamp, uint arg3)
Emitted when an event is passed through.
- public virtual signal void item_activated (uint arg1)
Emitted on the objects on the server side when they are signaled on the client side.
- public virtual signal void property_changed (string value, Variant arg2)
Emitted everytime a property on a menuitem is either updated or added.
- public virtual signal void realized ()
Emitted when the initial request for properties is complete on the item.
- public virtual signal void show_to_user (uint timestamp)
Signaled when the application would like the visualization of this menu item shown to the user.
Inherited Members:
All known members inherited from class GLib.Object