/** * Gets the active setting for a specific policy. * * Keep in mind that setting a policy flag is asynchronous, so changes are * not effective immediately after calling setPolicyFlag(). In addition, a * policy request can be declined by the user. You should always set the * policy flags required by your application at startup and check that the * policy change request was successful after an appropriate interval. * * If the controller object is not connected to the Leap Motion software, then the default * state for the selected policy is returned. * * \include Controller_isPolicySet.txt * * @param flags A PolicyFlag value indicating the policy to query. * @returns A boolean indicating whether the specified policy has been set. * @since 2.1.6 */ public bool IsPolicySet(Controller.PolicyFlag policy) { return(_connection.IsPolicySet(policy)); }
/** * Requests setting a policy. * * A request to change a policy is subject to user approval and a policy * can be changed by the user at any time (using the Leap Motion settings dialog). * The desired policy flags must be set every time an application runs. * * Policy changes are completed asynchronously and, because they are subject * to user approval or system compatibility checks, may not complete successfully. Call * Controller::isPolicySet() after a suitable interval to test whether * the change was accepted. * * \include Controller_setPolicy.txt * * @param policy A PolicyFlag value indicating the policy to request. * @since 2.1.6 */ public void SetPolicy(Controller.PolicyFlag policy) { _connection.SetPolicy(policy); }
/** * Requests clearing a policy. * * Policy changes are completed asynchronously and, because they are subject * to user approval or system compatibility checks, may not complete successfully. Call * Controller::isPolicySet() after a suitable interval to test whether * the change was accepted. * * \include Controller_clearPolicy.txt * * @param flags A PolicyFlag value indicating the policy to request. * @since 2.1.6 */ public void ClearPolicy(Controller.PolicyFlag policy) { _connection.ClearPolicy(policy); }
bool IController.IsPolicySet(Controller.PolicyFlag policy) { throw new NotImplementedException(); }
/// <summary> /// Gets the active setting for a specific policy. /// /// Keep in mind that setting a policy flag is asynchronous, so changes are /// not effective immediately after calling setPolicyFlag(). In addition, a /// policy request can be declined by the user. You should always set the /// policy flags required by your application at startup and check that the /// policy change request was successful after an appropriate interval. /// /// If the controller object is not connected to the Leap Motion software, then the default /// state for the selected policy is returned. /// /// /// @since 2.1.6 /// </summary> public bool IsPolicySet(Controller.PolicyFlag policy) { UInt64 policyToCheck = (ulong)FlagForPolicy(policy); return((_activePolicies & policyToCheck) == policyToCheck); }
public bool IsPolicySet(Controller.PolicyFlag policy) { Debug.Log("SetPolicy: IsPolicySet"); return(true); }
void IController.ClearPolicy(Controller.PolicyFlag policy) { throw new NotImplementedException(); }
public void ClearPolicy(Controller.PolicyFlag policy) { UInt64 clearFlags = (ulong)flagForPolicy(policy); _requestedPolicies = _requestedPolicies & ~clearFlags; eLeapRS result = LeapC.SetPolicyFlags(_leapConnection, _requestedPolicies, ~_requestedPolicies); reportAbnormalResults("LeapC SetPolicyFlags call was ", result); }
/** * Gets the active setting for a specific policy. * * Keep in mind that setting a policy flag is asynchronous, so changes are * not effective immediately after calling setPolicyFlag(). In addition, a * policy request can be declined by the user. You should always set the * policy flags required by your application at startup and check that the * policy change request was successful after an appropriate interval. * * If the controller object is not connected to the Leap Motion software, then the default * state for the selected policy is returned. * * \include Controller_isPolicySet.txt * * @param flags A PolicyFlag value indicating the policy to query. * @returns A boolean indicating whether the specified policy has been set. * @since 2.1.6 */ public bool IsPolicySet(Controller.PolicyFlag policy) { //return _connection.IsPolicySet(policy); return(true); }
private void InitializeFlags() { Controller.PolicyFlag policy_flags = controller.PolicyFlags & ~Controller.PolicyFlag.POLICY_OPTIMIZE_HMD; controller.SetPolicyFlags(policy_flags); }
public new void SetPolicy(Controller.PolicyFlag policy) { _localController.SetPolicy(policy); }
public new void ClearPolicy(Controller.PolicyFlag policy) { _localController.ClearPolicy(policy); }
public new void ClearPolicy(Controller.PolicyFlag policy) { sendMessage("ClearPolicy"); binFormatter.Serialize(stream, policy); }
public new bool IsPolicySet(Controller.PolicyFlag policy) { sendMessage("IsPolicySet"); binFormatter.Serialize(stream, policy); return(Boolean.Parse(r.ReadLine())); }