Name

condition power assertions, conditionpowerassertions, kPMConditionConditionPowerAssertions — Conditional on whether other processes have power assertions set.

Synopsis

condition power assertions structure { invert, type };
invert : boolean, default, optional
type : string, choice

Description

Conditional on whether other processes have power assertions set.

Processes can request that the computer does not dim the display or sleep. These requests take the form of assertions.

The power assertions 'do not display sleep' and 'do not sleep' are checked. If either assertion is set, the condition will be true.

Power assertions are available on Mac OS X 10.5, aka Leopard, and later. Where power assertions are not available, the condition is always false.

Fields

invert. Invert the condition's conclusion.

Conditions are designed to positively identify specific states. Many events will want a condition to confirm that a specific state is not occuring. To reverse the role of a positive condition, use the invert field.

If a condition is true, and the invert field is set, the condition will invert the true and return false.

If a condition is false, and the invert field is set, the condition will invert the false and return true.

invert is a boolean. If invert is omitted, the default false is used. invert is optional.

type. Type of condition to test.

type is a string. type must be power assertions, kPMConditionType_PowerAssertions.