internal void Update(AccessibleProxy e)
{
bool initializing = (stateSet == null);
if (e.name != name) {
string oldName = name;
name = e.name;
if (!initializing)
Desktop.RaiseNameChanged (this, oldName, e.name);
}
parent = Registry.GetElement (e.parent, false);
if (parent == null && role == Role.Application)
parent = Desktop.Instance;
// Assuming that old and new parents are also
// going to send ChildrenChanged signals, so
// not going to update their caches or send
// add/remove notifications here.
Role newRole = (Role)e.role;
if (newRole != role) {
Role oldRole = role;
role = newRole;
if (!initializing)
Desktop.RaiseRoleChanged (this, oldRole, newRole);
}
if (e.description != description) {
string oldDescription = description;
description = e.description;
if (!initializing)
Desktop.RaiseDescriptionChanged (this, oldDescription, e.description);
}
interfaces = 0;
foreach (string iface in e.interfaces)
AddInterface (iface);
stateSet = new StateSet (this, e.states);
// Using at-spi StateChanged events to broadcast
// changes for now; needed for gail Focused handling
UpdateChildren (e.children);
}