ForceFeedback.h

Public Interfaces to the Force Feedback implementation in macOS.

Overview

The Force Feedback API allows developers to control Force Feedback devices attached to the system. It is a distilled version of the Force Feedback functionality found in Microsoft's DirectInput API. Developers familiar with that API should find this API to be similar.

Included Headers

  • <CoreFoundation/CoreFoundation.h>

  • <CoreFoundation/CFPlugInCOM.h>

  • <MacTypes.h>

  • <IOKit/IOTypes.h>

  • <ForceFeedback/ForceFeedbackConstants.h>

Topics

Miscellaneous

FFCreateDevice

Creates a new API device object from an OS object in preparation to use the device for force feedback.

FFDeviceCreateEffect

Creates and initializes an instance of an effect identified by the effect UUID on the device.

FFDeviceEscape

Sends a hardware-specific command to the device.

FFDeviceGetForceFeedbackCapabilities

Retrieves the device's force feedback capabilities.

FFDeviceGetForceFeedbackProperty

Gets properties that define the device behavior.

FFDeviceGetForceFeedbackState

Retrieves the state of the device's force feedback system.

FFDeviceReleaseEffect

Disposes of an API effect object created with FFDeviceCreateEffect.

FFDeviceSendForceFeedbackCommand

Sends a command to the device's force feedback system.

FFDeviceSetCooperativeLevel

Function is unimplemented in version 1.0 of this API

FFDeviceSetForceFeedbackProperty

Retrieves the device's force feedback capabilities.

FFEffectDownload

Places the effect on the device. If the effect is already on the device, the existing effect is updated to match the values set by the FFEffectSetParameters method.

FFEffectEscape

Sends a hardware-specific command to the driver.

FFEffectGetEffectStatus

Sends a hardware-specific command to the driver.

FFEffectGetParameters

Retrieves information about an effect.

FFEffectSetParameters

Sets the characteristics of an effect.

FFEffectStart

Begins playing an effect. If the effect is already playing, it is restarted from the beginning. If the effect has not been downloaded or has been modified since its last download, it is downloaded before being started. This default behavior can be suppressed by passing the FFES_NODOWNLOAD flag.

FFEffectStop

Stops playing an effect.

FFEffectUnload

Removes the effect from the device. If the effect is playing, it is automatically stopped before it is unloaded.

FFIsForceFeedback

Used to determine if a particular device provided by HID Manager is a force feedback device.

FFReleaseDevice

Disposes of an API device object created with FFCreateDevice.

Data Types

See the Overview for header-level documentation.

FFCAPABILITIES

Used by the FFDeviceGetForceFeedbackCapabilities method to retrieve device force-feedback capabilities.

FFCONDITION

A structure containing type-specific information for certain effects.

FFCONSTANTFORCE

Contains type-specific information for the CONSTANTFORCE effect.

FFCUSTOMFORCE

Contains type-specific information for the CUSTOMFORCE effect.

FFEFFECT

UsUsed by the FFDeviceCreateEffect method to initialize a new effect object. It is also used by the FFEffectSetParameters and FFEffectGetParameters functions.

FFEFFESCAPE

The FFEFFESCAPE structure passes hardware-specific data directly to the Force Feedback plugIn.

FFENVELOPE

Used by the FFEFFECT structure to specify the optional envelope parameters for an effect.

FFPERIODIC

A structure containing type-specific information for certain effects.

FFRAMPFORCE

Contains type-specific information for the RAMPFORCE effect.

FFCAPABILITIES

Used by the FFDeviceGetForceFeedbackCapabilities method to retrieve device force-feedback capabilities.

FFCONDITION

A structure containing type-specific information for certain effects.

FFCONSTANTFORCE

Contains type-specific information for the CONSTANTFORCE effect.

FFCUSTOMFORCE

Contains type-specific information for the CUSTOMFORCE effect.

FFEFFECT

UsUsed by the FFDeviceCreateEffect method to initialize a new effect object. It is also used by the FFEffectSetParameters and FFEffectGetParameters functions.

FFEFFESCAPE

The FFEFFESCAPE structure passes hardware-specific data directly to the Force Feedback plugIn.

FFENVELOPE

Used by the FFEFFECT structure to specify the optional envelope parameters for an effect.

FFPERIODIC

A structure containing type-specific information for certain effects.

FFRAMPFORCE

Contains type-specific information for the RAMPFORCE effect.

Constants

See the Overview for header-level documentation.