forcefeedback

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package forcefeedback provides purego-based Go bindings for the macOS ForceFeedback framework.

Apple documentation: https://developer.apple.com/documentation/forcefeedback

Index

Constants

View Source
const (
	FFCAP_ET_CONSTANTFORCE = 1
	FFCAP_ET_CUSTOMFORCE   = 2048
	FFCAP_ET_DAMPER        = 256
	FFCAP_ET_FRICTION      = 1024
	FFCAP_ET_INERTIA       = 512
	FFCAP_ET_RAMPFORCE     = 2
	FFCAP_ET_SAWTOOTHDOWN  = 64
	FFCAP_ET_SAWTOOTHUP    = 32
	FFCAP_ET_SINE          = 8
	FFCAP_ET_SPRING        = 128
	FFCAP_ET_SQUARE        = 4
	FFCAP_ET_TRIANGLE      = 16
)
View Source
const (
	FFCAP_ST_KINESTHETIC = 1
	FFCAP_ST_VIBRATION   = 2
)
View Source
const (
	FFEFF_CARTESIAN = 16
	FFEFF_POLAR     = 32
	FFEFF_SPHERICAL = 64
)
View Source
const (
	FFEGES_EMULATED   = 2
	FFEGES_NOTPLAYING = 0
	FFEGES_PLAYING    = 1
)
View Source
const (
	FFEB_NOTRIGGER             = 4294967295
	FFEP_ALLPARAMS             = 1023
	FFEP_AXES                  = 32
	FFEP_DIRECTION             = 64
	FFEP_DURATION              = 1
	FFEP_ENVELOPE              = 128
	FFEP_GAIN                  = 4
	FFEP_NODOWNLOAD            = 2147483648
	FFEP_NORESTART             = 1073741824
	FFEP_SAMPLEPERIOD          = 2
	FFEP_START                 = 536870912
	FFEP_STARTDELAY            = 512
	FFEP_TRIGGERBUTTON         = 8
	FFEP_TRIGGERREPEATINTERVAL = 16
	FFEP_TYPESPECIFICPARAMS    = 256
)
View Source
const (
	FFES_NODOWNLOAD = 2147483648
	FFES_SOLO       = 1
)
View Source
const (
	FFGFFS_ACTUATORSOFF    = 32
	FFGFFS_ACTUATORSON     = 16
	FFGFFS_DEVICELOST      = 2147483648
	FFGFFS_EMPTY           = 1
	FFGFFS_PAUSED          = 4
	FFGFFS_POWEROFF        = 128
	FFGFFS_POWERON         = 64
	FFGFFS_SAFETYSWITCHOFF = 512
	FFGFFS_SAFETYSWITCHON  = 256
	FFGFFS_STOPPED         = 2
	FFGFFS_USERFFSWITCHOFF = 2048
	FFGFFS_USERFFSWITCHON  = 1024
)
View Source
const (
	FFPROP_AUTOCENTER = 3
	FFPROP_FFGAIN     = 1
)
View Source
const (
	FFSCL_BACKGROUND   = 8
	FFSCL_EXCLUSIVE    = 1
	FFSCL_FOREGROUND   = 4
	FFSCL_NONEXCLUSIVE = 2
)
View Source
const (
	FFSFFC_CONTINUE        = 8
	FFSFFC_PAUSE           = 4
	FFSFFC_RESET           = 1
	FFSFFC_SETACTUATORSOFF = 32
	FFSFFC_SETACTUATORSON  = 16
	FFSFFC_STOPALL         = 2
)
View Source
const (
	KFFAPIMajorRev       = 1
	KFFAPIMinorAndBugRev = 0
	KFFAPINonRelRev      = 0
	KFFAPIStage          = 128
)

Variables

This section is empty.

Functions

func FFCreateDevice

func FFCreateDevice(hidDevice uint, pDeviceReference unsafe.Pointer) unsafe.Pointer

func FFDeviceCreateEffect

func FFDeviceCreateEffect(deviceReference unsafe.Pointer, uuidRef unsafe.Pointer, pEffectDefinition *FFEFFECT, pEffectReference unsafe.Pointer) unsafe.Pointer

func FFDeviceEscape

func FFDeviceEscape(deviceReference unsafe.Pointer, pFFEffectEscape *FFEFFESCAPE) unsafe.Pointer

func FFDeviceGetForceFeedbackCapabilities

func FFDeviceGetForceFeedbackCapabilities(deviceReference unsafe.Pointer, pFFCapabilities *FFCAPABILITIES) unsafe.Pointer

func FFDeviceGetForceFeedbackProperty

func FFDeviceGetForceFeedbackProperty(deviceReference unsafe.Pointer, property uint, pValue unsafe.Pointer, valueSize uint64) unsafe.Pointer

func FFDeviceGetForceFeedbackState

func FFDeviceGetForceFeedbackState(deviceReference unsafe.Pointer, pFFState *uint) unsafe.Pointer

func FFDeviceReleaseEffect

func FFDeviceReleaseEffect(deviceReference unsafe.Pointer, effectReference unsafe.Pointer) unsafe.Pointer

func FFDeviceSendForceFeedbackCommand

func FFDeviceSendForceFeedbackCommand(deviceReference unsafe.Pointer, flags uint) unsafe.Pointer

func FFDeviceSetCooperativeLevel

func FFDeviceSetCooperativeLevel(deviceReference unsafe.Pointer, taskIdentifier unsafe.Pointer, flags uint) unsafe.Pointer

func FFDeviceSetForceFeedbackProperty

func FFDeviceSetForceFeedbackProperty(deviceReference unsafe.Pointer, property uint, pValue unsafe.Pointer) unsafe.Pointer

func FFEffectDownload

func FFEffectDownload(effectReference unsafe.Pointer) unsafe.Pointer

func FFEffectEscape

func FFEffectEscape(effectReference unsafe.Pointer, pFFEffectEscape *FFEFFESCAPE) unsafe.Pointer

func FFEffectGetEffectStatus

func FFEffectGetEffectStatus(effectReference unsafe.Pointer, pFlags *uint) unsafe.Pointer

func FFEffectGetParameters

func FFEffectGetParameters(effectReference unsafe.Pointer, pFFEffect *FFEFFECT, flags uint) unsafe.Pointer

func FFEffectSetParameters

func FFEffectSetParameters(effectReference unsafe.Pointer, pFFEffect *FFEFFECT, flags uint) unsafe.Pointer

func FFEffectStart

func FFEffectStart(effectReference unsafe.Pointer, iterations uint, flags uint) unsafe.Pointer

func FFEffectStop

func FFEffectStop(effectReference unsafe.Pointer) unsafe.Pointer

func FFEffectUnload

func FFEffectUnload(effectReference unsafe.Pointer) unsafe.Pointer

func FFIsForceFeedback

func FFIsForceFeedback(hidDevice uint) unsafe.Pointer

func FFReleaseDevice

func FFReleaseDevice(deviceReference unsafe.Pointer) unsafe.Pointer

func SymbolAvailable

func SymbolAvailable(symbol string) bool

SymbolAvailable reports whether the named C symbol was bound when the library loaded. Calling a generated wrapper whose symbol is unavailable dereferences a nil function variable and panics.

Types

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type FFCAPABILITIES

type FFCAPABILITIES struct {
	FfSpecVer        unsafe.Pointer
	SupportedEffects uint
	EmulatedEffects  uint
	SubType          uint
	NumFfAxes        uint
	FfAxes           [32]uint8
	StorageCapacity  uint
	PlaybackCapacity uint
	FirmwareVer      unsafe.Pointer
	HardwareVer      unsafe.Pointer
	DriverVer        unsafe.Pointer
}

@typedef FFCAPABILITIES @abstract Used by the FFDeviceGetForceFeedbackCapabilities method to retrieve device force-feedback capabilities. @discussion This structure has no DirectInput equivalent. @field ffSpecVer Specifies the version number of the FF API specification supported by this plugIn. It should be specified using the fields of the NumVersion structure. The first version of the FF API specification is 1.0.0f0. @field supportedEffects FFCapabilitiesEffectType flags that identify all effect types supported by the plugIn/device (including driver-emulated effects). This value can be a combination of one or more of the following values: <br> <br>FFCAP_ET_CONSTANTFORCE <br>The Constant Force effect type is supported by this device. <br>... <br> <br>FFCAP_ET_* <br> <br>See the header file ForceFeedbackConstants.h for a complete list of FFCapabilitiesEffectType flags. <br> @field emulatedEffects FFCapabilitiesEffectType flags that identify all effect types not directly supported by the device, but emulated by the plugIn. The emulated effects flags must also appear in the supportedEffects member. This value can be a combination of one or more of the following values: <br> <br>FFCAP_ET_* <br> <br>See the header file ForceFeedbackConstants.h for a complete list of FFCapabilitiesEffectType flags. @field subType The force-feedback sub-category which best identifies the device's FF capabilities. This value can be one of the following: <br> <br>FFCAP_ST_KINESTHETIC <br>A kinesthetic force feedback device is one that can produce "grounded" forces based on the controller's position. It supports temporal force-feedback effects (periodic vibrations), as well as directional (constant force) and position-based (spring, damper) forces. Most higher-end force-feedback joysticks and steering wheels fall into this category. <br> <br>FFCAP_ST_VIBRATION <br>A vibration force feedback device is one that can only produce non-grounded temporal force-feedback effects (periodic vibrations). Most console gamepads and some lower-end joysticks fall into this category. <br> <br>The force-feedback subtype must be provided, and can only be one of the aforementioned values. @field numFfAxes The number of controller axes that provide force feedback. Indicates the number of valid elements in ffAxes. @field ffAxes An array of values that decribe the axes on which force-feedback is present. The number of valid elements in the array is specified in numFfAxes. Each element of the array can contain one of the following values: <br> <br>FFJOFS_X <br>The X-axis is force-feedback-actuated. <br> <br>FFJOFS_Y <br>The Y-axis is force-feedback-actuated. <br> <br>FFJOFS_Z <br>The Z-axis is force-feedback-actuated. <br> <br>For devices of subType FFCAP_ST_VIBRATION, it is recommended that the numFfAxes = 1, and that ffAxes[0] = FFJOFS_X. @field storageCapacity The maximum number of effects that can be created via calls to FFDeviceCreateEffect and coexist at any one time. This may or may not be different from the playbackCapacity, depending on device driver complexity. @field playbackCapacity The maximum number of created effects that can be simultaneously played via calls to FFEffectStart. This number will always be equal to or less than the storageCapacity. A device driver may allow more effects to be created than the physical device can actually handle. Therefore, this number is an important parameter for FF designers. @field driverVer Specifies the version number of the force-feedback device driver, using a NumVersion structure. @field firmwareVer Specifies the firmware revision of the device, using a NumVersion structure. @field hardwareVer Specifies the hardware revision of the device, using a NumVersion structure.

type FFCONDITION

type FFCONDITION struct {
	LOffset              int
	LPositiveCoefficient int
	LNegativeCoefficient int
	DwPositiveSaturation uint
	DwNegativeSaturation uint
	LDeadBand            int
}

@typedef FFCONDITION @abstract Contains type-specific information for the following effects. <ul> <li>SPRING</li> <li>DAMPER</li> <li>INERTIA</li> <li>FRICTION</li> </ul> @discussion A pointer to an array of FFCONDITION structures for an effect is passed in the <b>lpvTypeSpecificParams</b> member of the FFEFFECT structure. The number of elements in the array must be either one, or equal to the number of axes associated with the effect. <br> <br> Different types of conditions interpret the parameters differently, but the basic idea is that force resulting from a condition is equal to <i>A(q - q0)</i> where <i>A</i> is a scaling coefficient, <i>q</i> is some metric, and <i>q0</i> is the neutral value for that metric. <br> <br> The preceding simplified formula must be adjusted if a nonzero deadband is provided. If the metric is less than <b>lOffset - lDeadBand</b>, the resulting force is given by the following formula:<br> <br><i>force</i> = <b>lNegativeCoefficient</b> * (<i>q</i> - (<b>lOffset - lDeadBand</b>)) <br> <br> Similarly, if the metric is greater than <b>lOffset + lDeadBand</b>, the resulting force is given by the following formula: <br> <br> <i>force</i> = <b>lPositiveCoefficient</b> * (<i>q</i> - (<b>lOffset + lDeadBand</b>)) <br> <br> A spring condition uses axis position as the metric. <br> <br> A damper condition uses axis velocity as the metric. <br> <br> An inertia condition uses axis acceleration as the metric. <br> <br> If the number of FFCONDITION structures in the array is equal to the number of axes for the effect, the first structure applies to the first axis, the second applies to the second axis, and so on. For example, a two-axis spring condition with <b>lOffset</b> set to 0 in both FFCONDITION structures would have the same effect as the joystick self-centering spring. When a condition is defined for each axis in this way, the effect must not be rotated. <br> <br> If there is a single FFCONDITION structure for an effect with more than one axis, the direction along which the parameters of the FFCONDITION structure are in effect is determined by the direction parameters passed in the <b>rglDirection</b> field of the FFEFFECT structure. For example, a friction condition rotated 45 degrees (in polar coordinates) would resist joystick motion in the northeast-southwest direction but would have no effect on joystick motion in the northwest-southeast direction. @field lOffset Offset for the condition, in the range from -10,000 through 10,000. @field lPositiveCoefficient Coefficient constant on the positive side of the offset, in the range from -10,000 through 10,000. @field lNegativeCoefficient Coefficient constant on the negative side of the offset, in the range from -10,000 through 10,000. <br> <br> If the device does not support separate positive and negative coefficients, the value of <b>lNegativeCoefficient</b> is ignored, and the value of <b>lPositiveCoefficient</b> is used as both the positive and negative coefficients. @field dwPositiveSaturation Maximum force output on the positive side of the offset, in the range from 0 through 10,000. <br> <br> If the device does not support force saturations, the value of this member is ignored. @field dwNegativeSaturation Maximum force output on the negative side of the offset, in the range from 0 through 10,000. <br> <br> If the device does not support force saturation, the value of this member is ignored. <br> <br> If the device does not support separate positive and negative saturation, the value of <b>dwNegativeSaturation</b> is ignored, and the value of <b>dwPositiveSaturation</b> is used as both the positive and negative saturation. @field lDeadBand Region around <b>lOffset</b> in which the condition is not active, in the range from 0 through 10,000. In other words, the condition is not active between <b>lOffset</b> minus <b>lDeadBand</b> and <b>lOffset</b> plus <b>lDeadBand</b>.

type FFCONSTANTFORCE

type FFCONSTANTFORCE struct {
	LMagnitude int
}

@typedef FFCONSTANTFORCE @abstract Contains type-specific information for the CONSTANTFORCE effect. @discussion A pointer to a single FFCONSTANTFORCE structure for an effect is passed in the <b>lpvTypeSpecificParams</b> member of the FFEFFECT structure. @field lMagnitude The magnitude of the effect, in the range from -10,000 through 10,000. If an envelope is applied to this effect, the value represents the magnitude of the sustain. If no envelope is applied, the value represents the amplitude of the entire effect.

type FFCUSTOMFORCE

type FFCUSTOMFORCE struct {
	CChannels      uint
	DwSamplePeriod uint
	CSamples       uint
	RglForceData   *int
}

@typedef FFCUSTOMFORCE @abstract Contains type-specific information for the CUSTOMFORCE effect. @discussion A pointer to a single FFCUSTOMFORCE structure for an effect is passed in the <b>lpvTypeSpecificParams</b> member of the FFEFFECT structure. The structure describes a custom or user-defined force. @field cChannels Number of channels (axes) affected by this force. <br> <br> The first channel is applied to the first axis associated with the effect, the second to the second, and so on. If there are fewer channels than axes, nothing is associated with the extra axes. <br> <br> If there is only a single channel, the effect is rotated in the direction specified by the <b>rglDirection</b> member of the FFEFFECT structure. If there is more than one channel, rotation is not allowed. <br> <br> Not all devices support rotation of custom effects. @field dwSamplePeriod Sample period, in microseconds. @field cSamples Total number of samples in the <b>rglForceData</b>. It must be an integral multiple of the <b>cChannels</b>. @field rglForceData Pointer to an array of force values representing the custom force. If multiple channels are provided, the values are interleaved. For example, if <b>cChannels</b> is 3, the first element of the array belongs to the first channel, the second to the second, and the third to the third.

type FFDHIDDEN

type FFDHIDDEN struct{}

C struct: __FFDHIDDEN FFDHIDDEN is an opaque type.

type FFEFFECT

type FFEFFECT struct {
	DwSize                  uint
	DwFlags                 uint
	DwDuration              uint
	DwSamplePeriod          uint
	DwGain                  uint
	DwTriggerButton         uint
	DwTriggerRepeatInterval uint
	CAxes                   uint
	RgdwAxes                *uint
	RglDirection            *int
	LpEnvelope              *FFENVELOPE
	CbTypeSpecificParams    uint
	LpvTypeSpecificParams   unsafe.Pointer
	DwStartDelay            uint
}

@typedef FFEFFECT @abstract UsUsed by the FFDeviceCreateEffect method to initialize a new effect object. It is also used by the FFEffectSetParameters and FFEffectGetParameters functions. @discussion OBJECT IDS cannot be used to identify trigger buttons in <b>dwTriggerButton</b>, and output axes in <b>rgdwAxes[<i>n</i>]</b>. Please use object offsets (FFJOFS_* constants), the only supported method. @field dwSize Size, in bytes, of this structure. This member must be initialized before the structure is used. @field dwFlags Flags associated with the effect. This value can be a combination of one or more of the following values: <ul> <li>FFEFF_CARTESIAN </li> </ul> The values of <b>rglDirection</b> are to be interpreted as Cartesian coordinates. <ul> <li>FFEFF_OBJECTOFFSETS </li> </ul> The values of <b>dwTriggerButton</b> and <b>rgdwAxes</b> are data format offsets, FFJOFS_* constants. This flag is not necessary, as the format is assumed. The OBJECTIDS method of specifying <b>dwTriggerButton</b> and <b>rgdwAxes</b> is not supported -- FFJOFS_* constants MUST be used. <ul> <li>FFEFF_POLAR </li> </ul> The values of <b>rglDirection</b> are to be interpreted as polar coordinates. <ul> <li>FFEFF_SPHERICAL </li> </ul> The values of <b>rglDirection</b> are to be interpreted as spherical coordinates. @field dwDuration The total duration of the effect, in microseconds. If this value is FF_INFINITE, the effect has infinite duration. If an envelope has been applied to the effect, the attack is applied, followed by an infinite sustain. @field dwSamplePeriod The period at which the device should play back the effect, in microseconds. A value of 0 indicates that the default playback sample rate should be used. <br> <br> If the device is not capable of playing back the effect at the specified rate, it chooses the supported rate that is closest to the requested value. <br> <br> Setting a custom <b>dwSamplePeriod</b> can be used for special effects. For example, playing a sine wave at an artificially large sample period results in a rougher texture. @field dwGain The gain to be applied to the effect, in the range from 0 through 10,000. The gain is a scaling factor applied to all magnitudes of the effect and its envelope. @field dwTriggerButton The identifier or offset of the button to be used to trigger playback of the effect. The FFJOFS_* flags must be used to specify the value. If this member is set to FFEB_NOTRIGGER, no trigger button is associated with the effect. @field dwTriggerRepeatInterval The interval, in microseconds, between the end of one playback and the start of the next when the effect is triggered by a button press and the button is held down. Setting this value to FF_INFINITE suppresses repetition. @field cAxes Number of axes involved in the effect. This member must be filled in by the caller if changing or setting the axis list or the direction list. <br> <br> The number of axes for an effect cannot be changed once it has been set. @field rgdwAxes Pointer to a DWORD array (of <b>cAxes</b> elements) containing identifiers or offsets identifying the axes to which the effect is to be applied. The FFJOFS_* flags must be used to specify the values in the array. <br> <br> The list of axes associated with an effect cannot be changed once it has been set. <br> <br> No more than 32 axes can be associated with a single effect. @field rglDirection Pointer to a LONG array (of <b>cAxes</b> elements) containing either Cartesian coordinates, polar coordinates, or spherical coordinates. The flags FFEFF_CARTESIAN, FFEFF_POLAR, and FFEFF_SPHERICAL determine the semantics of the values in the array. <br> <br> If Cartesian, each value in <b>rglDirection</b> is associated with the corresponding axis in <b>rgdwAxes</b>. <br> <br> If polar, the angle is measured in hundredths of degrees from the (0, -1) direction, rotated in the direction of (1, 0). This usually means that north is away from the user, and east is to the user's right. The last element is not used. <br> <br> If spherical, the first angle is measured in hundredths of a degree from the (1, 0) direction, rotated in the direction of (0, 1). The second angle (if the number of axes is three or more) is measured in hundredths of a degree toward (0, 0, 1). The third angle (if the number of axes is four or more) is measured in hundredths of a degree toward (0, 0, 0, 1), and so on. The last element is not used. <br> <br> Note: The <b>rglDirection</b> array must contain <b>cAxes</b> entries, even if polar or spherical coordinates are given. In these cases, the last element in the <b>rglDirection</b> array is reserved for future use and must be 0. @field lpEnvelope Optional pointer to a FFENVELOPE structure that describes the envelope to be used by this effect. Not all effect types use envelopes. If no envelope is to be applied, the member should be set to NULL. @field cbTypeSpecificParams Number of bytes of additional type-specific parameters for the corresponding effect type. @field lpvTypeSpecificParams TPointer to type-specific parameters, or NULL if there are no type-specific parameters. <br> <br> If the effect is of type FFEFT_CONDITION, this member contains a pointer to an array of FFCONDITION structures that define the parameters for the condition. A single structure may be used, in which case the condition is applied in the direction specified in the <b>rglDirection</b> array. Otherwise, there must be one structure for each axis, in the same order as the axes in <b>rgdwAxes</b> array. If a structure is supplied for each axis, the effect should not be rotated; you should use the following values in the <b>rglDirection</b> array: <ul> <li>FFEFF_SPHERICAL: 0, 0, ... </li> <li>FFEFF_POLAR: 9000, 0, ... </li> <li>FFEFF_CARTESIAN: 1, 0, ... </li> </ul> If the effect is of type FFEFT_CUSTOMFORCE, this member contains a pointer to a FFCUSTOMFORCE structure that defines the parameters for the custom force. <br> <br> If the effect is of type FFEFT_PERIODIC, this member contains a pointer to a FFPERIODIC structure that defines the parameters for the effect. <br> <br> If the effect is of type FFEFT_CONSTANTFORCE, this member contains a pointer to a FFCONSTANTFORCE structure that defines the parameters for the constant force. <br> <br> If the effect is of type FFEFT_RAMPFORCE, this member contains a pointer to a FFRAMPFORCE structure that defines the parameters for the ramp force. @field dwStartDelay Time (in microseconds) that the device should wait after a FFEffectStart call before playing the effect. If this value is 0, effect playback begins immediately.

type FFEFFESCAPE

type FFEFFESCAPE struct {
	DwSize       uint
	DwCommand    uint
	LpvInBuffer  unsafe.Pointer
	CbInBuffer   uint
	LpvOutBuffer unsafe.Pointer
	CbOutBuffer  uint
}

@typedef FFEFFESCAPE @abstract The FFEFFESCAPE structure passes hardware-specific data directly to the Force Feedback plugIn. @discussion @field dwSize Size, in bytes, of this structure. This member must be initialized before the structure is used. @field dwCommand Specifies a plugIn specific command number. Contact the hardware vendor for a list of valid commands and their parameters. @field lpvInBuffer Buffer containing the data required to perform the operation. @field cbInBuffer Specifies the size, in bytes, of the <b>lpvInBuffer</b> buffer. @field lpvOutBuffer Buffer in which the operation's output data is returned. @field cbOutBuffer On entry, specifies the size, in bytes, of the <b>lpvOutBuffer</b> buffer. On exit, specifies the number of bytes actually produced by the command.

type FFEHIDDEN

type FFEHIDDEN struct{}

C struct: __FFEHIDDEN FFEHIDDEN is an opaque type.

type FFENVELOPE

type FFENVELOPE struct {
	DwSize        uint
	DwAttackLevel uint
	DwAttackTime  uint
	DwFadeLevel   uint
	DwFadeTime    uint
}

@typedef FFENVELOPE @abstract Used by the FFEFFECT structure to specify the optional envelope parameters for an effect. @discussion The sustain level for the envelope is represented by the <b>dwMagnitude</b> member of the FFPERIODIC structure and the <b>lMagnitude</b> member of the FFCONSTANTFORCE structure. The sustain time is represented by <b>dwDuration</b> member of the FFEFFECT structure @field dwSize Size, in bytes, of this structure. This member must be initialized before the structure is used. @field dwAttackLevel Amplitude for the start of the envelope, relative to the baseline, in the range from 0 through 10,000. If the effect's type-specific data does not specify a baseline, the amplitude is relative to 0. @field dwAttackTime The time, in microseconds, to reach the sustain level. @field dwFadeLevel Amplitude for the end of the envelope, relative to the baseline, in the range from 0 through 10,000. If the effect's type-specific data does not specify a baseline, the amplitude is relative to 0. @field dwFadeTime The time, in microseconds, to reach the fade level.

type FFPERIODIC

type FFPERIODIC struct {
	DwMagnitude uint
	LOffset     int
	DwPhase     uint
	DwPeriod    uint
}

@typedef FFPERIODIC @abstract Contains type-specific information for the following effects. <ul> <li>SINE</li> <li>SQUARE</li> <li>TRIANGLE</li> <li>SAWTOOTHUP</li> <li>SAWTOOTHDOWN</li> </ul> @discussion A pointer to a single FFPERIODIC structure for an effect is passed in the lpvTypeSpecificParams member of the FFEFFECT structure. A Force Feedback plugIn cannot provide support for all values in the <b>dwPhase</b> member. In this case, the value is rounded off to the nearest supported value. @field dwMagnitude Magnitude of the effect, in the range from 0 through 10,000. If an envelope is applied to this effect, the value represents the magnitude of the sustain. If no envelope is applied, the value represents the amplitude of the entire effect. @field lOffset Offset of the effect. The range of forces generated by the effect is <b>lOffset</b> minus <b>dwMagnitude</b> to <b>lOffset</b> plus <b>dwMagnitude</b>. The value of the <b>lOffset</b> member is also the baseline for any envelope that is applied to the effect. @field dwPhase Position in the cycle of the periodic effect at which playback begins, in the range from 0 through 35,999. @field dwPeriod Period of the effect, in microseconds.

type FFRAMPFORCE

type FFRAMPFORCE struct {
	LStart int
	LEnd   int
}

@typedef FFRAMPFORCE @abstract Contains type-specific information for the RAMPFORCE effect. @discussion A pointer to a single FFRAMPFORCE structure for an effect is passed in the <b>lpvTypeSpecificParams</b> member of the FFEFFECT structure. The dwDuration for a ramp force effect cannot be FF_INFINITE. @field lMagnitude Magnitude at the start of the effect, in the range from -10,000 through 10,000. @field lEnd Magnitude at the end of the effect, in the range from -10,000 through 10,000.

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL