status_t ResolveValueNodeValueJob::_ResolveNodeChildLocation(ValueNodeChild* nodeChild) { // resolve the location ValueLoader valueLoader(fArchitecture, fDebuggerInterface, fCpuState); ValueLocation* location = NULL; status_t error = nodeChild->ResolveLocation(&valueLoader, location); Reference<ValueLocation> locationReference(location, true); // set the location on the node child AutoLocker<ValueNodeContainer> containerLocker(fContainer); status_t nodeChildResolutionState = nodeChild->LocationResolutionState(); if (nodeChildResolutionState == VALUE_NODE_UNRESOLVED) nodeChild->SetLocation(location, error); else error = nodeChildResolutionState; return error; }
bool KWinWaylandTouchpad::getConfig() { bool success = true; // general success &= valueLoader(m_supportsDisableEvents); success &= valueLoader(m_supportsLeftHanded); success &= valueLoader(m_supportedButtons); success &= valueLoader(m_leftHandedEnabledByDefault); success &= valueLoader(m_enabled); success &= valueLoader(m_leftHanded); // advanced success &= valueLoader(m_supportsPointerAcceleration); success &= valueLoader(m_supportsPointerAccelerationProfileFlat); success &= valueLoader(m_supportsPointerAccelerationProfileAdaptive); success &= valueLoader(m_supportsDisableWhileTyping); success &= valueLoader(m_supportsDisableEventsOnExternalMouse); success &= valueLoader(m_defaultPointerAcceleration); success &= valueLoader(m_defaultPointerAccelerationProfileFlat); success &= valueLoader(m_defaultPointerAccelerationProfileAdaptive); success &= valueLoader(m_disableWhileTypingEnabledByDefault); success &= valueLoader(m_leftHandedEnabledByDefault); success &= valueLoader(m_pointerAcceleration); success &= valueLoader(m_pointerAccelerationProfileFlat); success &= valueLoader(m_pointerAccelerationProfileAdaptive); success &= valueLoader(m_disableWhileTyping); // tapping success &= valueLoader(m_tapFingerCount); success &= valueLoader(m_supportsMiddleEmulation); success &= valueLoader(m_tapToClickEnabledByDefault); success &= valueLoader(m_tapAndDragEnabledByDefault); success &= valueLoader(m_tapDragLockEnabledByDefault); success &= valueLoader(m_middleEmulationEnabledByDefault); success &= valueLoader(m_tapToClick); success &= valueLoader(m_tapAndDrag); success &= valueLoader(m_tapDragLock); success &= valueLoader(m_middleEmulation); success &= valueLoader(m_lmrTapButtonMapEnabledByDefault); success &= valueLoader(m_lmrTapButtonMap); // scrolling modes avail success &= valueLoader(m_supportsNaturalScroll); success &= valueLoader(m_supportsScrollTwoFinger); success &= valueLoader(m_supportsScrollEdge); success &= valueLoader(m_supportsScrollOnButtonDown); // default scrolling modes success &= valueLoader(m_naturalScrollEnabledByDefault); success &= valueLoader(m_scrollTwoFingerEnabledByDefault); success &= valueLoader(m_scrollEdgeEnabledByDefault); success &= valueLoader(m_scrollOnButtonDownEnabledByDefault); success &= valueLoader(m_defaultScrollButton); // current scrolling mode success &= valueLoader(m_naturalScroll); success &= valueLoader(m_isScrollTwoFinger); success &= valueLoader(m_isScrollEdge); success &= valueLoader(m_isScrollOnButtonDown); success &= valueLoader(m_scrollButton); return success; }
bool KWinWaylandTouchpad::init() { // need to do it here in order to populate combobox and handle events return valueLoader(m_name) && valueLoader(m_sysName); }
status_t ResolveValueNodeValueJob::_ResolveNodeValue() { // get the node child and parent node AutoLocker<ValueNodeContainer> containerLocker(fContainer); ValueNodeChild* nodeChild = fValueNode->NodeChild(); BReference<ValueNodeChild> nodeChildReference(nodeChild); ValueNode* parentNode = nodeChild->Parent(); BReference<ValueNode> parentNodeReference(parentNode); // Check whether the node child location has been resolved already // (successfully). status_t nodeChildResolutionState = nodeChild->LocationResolutionState(); bool nodeChildDone = nodeChildResolutionState != VALUE_NODE_UNRESOLVED; if (nodeChildDone && nodeChildResolutionState != B_OK) return nodeChildResolutionState; // If the child node location has not been resolved yet, check whether the // parent node location and value have been resolved already (successfully). bool parentDone = true; if (!nodeChildDone && parentNode != NULL) { status_t parentResolutionState = parentNode->LocationAndValueResolutionState(); parentDone = parentResolutionState != VALUE_NODE_UNRESOLVED; if (parentDone && parentResolutionState != B_OK) return parentResolutionState; } containerLocker.Unlock(); // resolve the parent node location and value, if necessary if (!parentDone) { status_t error = _ResolveParentNodeValue(parentNode); if (error != B_OK) { TRACE_LOCALS("ResolveValueNodeValueJob::_ResolveNodeValue(): value " "node: %p (\"%s\"): _ResolveParentNodeValue(%p) failed\n", fValueNode, fValueNode->Name().String(), parentNode); return error; } } // resolve the node child location, if necessary if (!nodeChildDone) { status_t error = _ResolveNodeChildLocation(nodeChild); if (error != B_OK) { TRACE_LOCALS("ResolveValueNodeValueJob::_ResolveNodeValue(): value " "node: %p (\"%s\"): _ResolveNodeChildLocation(%p) failed\n", fValueNode, fValueNode->Name().String(), nodeChild); return error; } } // resolve the node location and value ValueLoader valueLoader(fArchitecture, fDebuggerInterface, fTypeInformation, fCpuState); ValueLocation* location; Value* value; status_t error = fValueNode->ResolvedLocationAndValue(&valueLoader, location, value); if (error != B_OK) { TRACE_LOCALS("ResolveValueNodeValueJob::_ResolveNodeValue(): value " "node: %p (\"%s\"): fValueNode->ResolvedLocationAndValue() " "failed\n", fValueNode, fValueNode->Name().String()); return error; } BReference<ValueLocation> locationReference(location, true); BReference<Value> valueReference(value, true); // set location and value on the node containerLocker.Lock(); status_t nodeResolutionState = fValueNode->LocationAndValueResolutionState(); if (nodeResolutionState != VALUE_NODE_UNRESOLVED) return nodeResolutionState; fValueNode->SetLocationAndValue(location, value, B_OK); containerLocker.Unlock(); return B_OK; }