Documentation
¶
Overview ¶
Package coremotion provides a fluent Go API over the macOS CoreMotion framework.
Construction ¶
New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.
Lifecycle ¶
A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.
Delegates ¶
A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.
Types ¶
Each base type below lists the concrete types you construct and pass where the base is accepted:
- LogItem: AccelerometerData, AmbientPressureData, DeviceMotion, GyroData, MagnetometerData, MotionActivity, RotationRateData
- RotationRateData: RecordedRotationRateData
Index ¶
- func CMErrorDomain() obj.Object
- func IsDistanceAvailable() bool
- func IsFloorCountingAvailable() bool
- func IsPaceAvailable() bool
- func IsStepCountingAvailable() bool
- type AccelerometerData
- type AmbientPressureData
- type Attitude
- func (a *Attitude) Description() string
- func (a *Attitude) IsEqual(other obj.Object) bool
- func (a *Attitude) IsKind(className string) bool
- func (a *Attitude) MultiplyByInverseOfAttitude(attitude *Attitude)
- func (a *Attitude) Pitch() float64
- func (a *Attitude) Quaternion() CMQuaternion
- func (a *Attitude) Roll() float64
- func (a *Attitude) RotationMatrix() CMRotationMatrix
- func (a *Attitude) String() string
- func (a *Attitude) Yaw() float64
- type AttitudeReferenceFrame
- type AuthorizationStatus
- type CMAcceleration
- type CMCalibratedMagneticField
- type CMMagneticField
- type CMQuaternion
- type CMRotationMatrix
- type CMRotationRate
- type Clockid
- type DeviceMotion
- func (dm *DeviceMotion) Attitude() *Attitude
- func (dm *DeviceMotion) Gravity() CMAcceleration
- func (dm *DeviceMotion) Heading() float64
- func (dm *DeviceMotion) MagneticField() CMCalibratedMagneticField
- func (dm *DeviceMotion) RotationRate() CMRotationRate
- func (dm *DeviceMotion) SensorLocation() DeviceMotionSensorLocation
- func (dm *DeviceMotion) UserAcceleration() CMAcceleration
- type DeviceMotionSensorLocation
- type DispatchAutoreleaseFrequency
- type DispatchBlockFlags
- type EntryID
- type Error
- type FilesecProperty
- type Flag
- type GyroData
- type HeadphoneActivityManager
- func (ham *HeadphoneActivityManager) Description() string
- func (ham *HeadphoneActivityManager) IsActivityActive() bool
- func (ham *HeadphoneActivityManager) IsActivityAvailable() bool
- func (ham *HeadphoneActivityManager) IsEqual(other obj.Object) bool
- func (ham *HeadphoneActivityManager) IsKind(className string) bool
- func (ham *HeadphoneActivityManager) IsStatusActive() bool
- func (ham *HeadphoneActivityManager) IsStatusAvailable() bool
- func (ham *HeadphoneActivityManager) StartActivityUpdatesToQueueWithHandler(queue obj.Object, handler func(obj.Object, unsafe.Pointer))
- func (ham *HeadphoneActivityManager) StartStatusUpdatesToQueueWithHandler(queue obj.Object, handler func(HeadphoneActivityStatus, unsafe.Pointer))
- func (ham *HeadphoneActivityManager) StopActivityUpdates()
- func (ham *HeadphoneActivityManager) StopStatusUpdates()
- func (ham *HeadphoneActivityManager) String() string
- type HeadphoneActivityStatus
- type HeadphoneMotionManager
- func (hmm *HeadphoneMotionManager) Description() string
- func (hmm *HeadphoneMotionManager) DeviceMotion() *DeviceMotion
- func (hmm *HeadphoneMotionManager) IsConnectionStatusActive() bool
- func (hmm *HeadphoneMotionManager) IsDeviceMotionActive() bool
- func (hmm *HeadphoneMotionManager) IsDeviceMotionAvailable() bool
- func (hmm *HeadphoneMotionManager) IsEqual(other obj.Object) bool
- func (hmm *HeadphoneMotionManager) IsKind(className string) bool
- func (hmm *HeadphoneMotionManager) StartConnectionStatusUpdates()
- func (hmm *HeadphoneMotionManager) StartDeviceMotionUpdates()
- func (hmm *HeadphoneMotionManager) StartDeviceMotionUpdatesToQueueWithHandler(queue obj.Object, handler func(obj.Object, unsafe.Pointer))
- func (hmm *HeadphoneMotionManager) StopConnectionStatusUpdates()
- func (hmm *HeadphoneMotionManager) StopDeviceMotionUpdates()
- func (hmm *HeadphoneMotionManager) String() string
- func (hmm *HeadphoneMotionManager) WithDelegate(delegate HeadphoneMotionManagerDelegate) *HeadphoneMotionManager
- type HeadphoneMotionManagerDelegate
- type HeadphoneMotionManagerDelegateHeadphoneMotionManagerDidConnectHandler
- type HeadphoneMotionManagerDelegateHeadphoneMotionManagerDidDisconnectHandler
- type Idtype
- type IpcInfoObjectType
- type LaunchDataType
- type LogItem
- type LogItemProvider
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type MachVMRangeFlags
- type MachVMRangeFlavor
- type MachVMRangeTag
- type MagneticFieldCalibrationAccuracy
- type MagnetometerData
- type MotionActivity
- func (ma *MotionActivity) Automotive() bool
- func (ma *MotionActivity) Confidence() MotionActivityConfidence
- func (ma *MotionActivity) Running() bool
- func (ma *MotionActivity) StartDate() time.Time
- func (ma *MotionActivity) Stationary() bool
- func (ma *MotionActivity) Unknown() bool
- func (ma *MotionActivity) Walking() bool
- type MotionActivityConfidence
- type MpoFlags
- type OSClockid
- type OdometerData
- func (od *OdometerData) DeltaAltitude() unsafe.Pointer
- func (od *OdometerData) DeltaDistance() unsafe.Pointer
- func (od *OdometerData) DeltaDistanceAccuracy() unsafe.Pointer
- func (od *OdometerData) Description() string
- func (od *OdometerData) EndDate() time.Time
- func (od *OdometerData) GpsDate() time.Time
- func (od *OdometerData) IsEqual(other obj.Object) bool
- func (od *OdometerData) IsKind(className string) bool
- func (od *OdometerData) MaxAbsSlope() *foundation.Number
- func (od *OdometerData) OriginDevice() OdometerOriginDevice
- func (od *OdometerData) Slope() *foundation.Number
- func (od *OdometerData) Speed() unsafe.Pointer
- func (od *OdometerData) SpeedAccuracy() unsafe.Pointer
- func (od *OdometerData) StartDate() time.Time
- func (od *OdometerData) String() string
- func (od *OdometerData) VerticalAccuracy() unsafe.Pointer
- type OdometerOriginDevice
- type Pedometer
- func (p *Pedometer) Description() string
- func (p *Pedometer) IsEqual(other obj.Object) bool
- func (p *Pedometer) IsKind(className string) bool
- func (p *Pedometer) QueryPedometerDataFromDateToDateWithHandler(start time.Time, end time.Time, handler func(obj.Object, unsafe.Pointer))
- func (p *Pedometer) StartPedometerUpdatesFromDateWithHandler(start time.Time, handler func(obj.Object, unsafe.Pointer))
- func (p *Pedometer) StopPedometerUpdates()
- func (p *Pedometer) String() string
- type PedometerData
- func (pd *PedometerData) AverageActivePace() unsafe.Pointer
- func (pd *PedometerData) CurrentCadence() unsafe.Pointer
- func (pd *PedometerData) CurrentPace() unsafe.Pointer
- func (pd *PedometerData) Description() string
- func (pd *PedometerData) Distance() *foundation.Number
- func (pd *PedometerData) EndDate() time.Time
- func (pd *PedometerData) FloorsAscended() *foundation.Number
- func (pd *PedometerData) FloorsDescended() *foundation.Number
- func (pd *PedometerData) IsEqual(other obj.Object) bool
- func (pd *PedometerData) IsKind(className string) bool
- func (pd *PedometerData) NumberOfSteps() *foundation.Number
- func (pd *PedometerData) StartDate() time.Time
- func (pd *PedometerData) String() string
- type PedometerEvent
- type PedometerEventType
- type Perm
- type PtrauthKey
- type QosClass
- type RecordedRotationRateData
- type RotationRateData
- type RotationRateDataProvider
- type Tag
- type Type
- type VirtualMemoryGuardExceptionCode
- type WaterSubmersionDepthState
- type WaterSubmersionState
- type XpcListenerCreateFlags
- type XpcSessionCreateFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CMErrorDomain ¶
CMErrorDomain returns the string constant CMErrorDomain, for use as a dictionary key or argument.
func IsDistanceAvailable ¶ added in v0.17.0
func IsDistanceAvailable() bool
IsDistanceAvailable reports whether returns a Boolean value indicating whether distance estimation is available on the current device.
func IsFloorCountingAvailable ¶ added in v0.17.0
func IsFloorCountingAvailable() bool
IsFloorCountingAvailable reports whether returns a Boolean value indicating whether floor counting is available on the current device.
func IsPaceAvailable ¶ added in v0.17.0
func IsPaceAvailable() bool
IsPaceAvailable reports whether returns a Boolean value indicating whether pace information is available on the current device.
func IsStepCountingAvailable ¶ added in v0.17.0
func IsStepCountingAvailable() bool
IsStepCountingAvailable reports whether returns a Boolean value indicating whether step counting is available on the current device.
Types ¶
type AccelerometerData ¶ added in v0.17.0
type AccelerometerData struct {
LogItem
}
AccelerometerData is an idiomatic wrapper over the Objective-C class CMAccelerometerData.
It embeds LogItem, promoting that type's methods.
A data sample from the device’s three accelerometers.
func AccelerometerDataFromID ¶ added in v0.17.0
func AccelerometerDataFromID(id objc.ID) *AccelerometerData
AccelerometerDataFromID adopts an existing Objective-C object as a AccelerometerData (nil for 0), retaining it and registering a release finalizer.
func NewAccelerometerData ¶ added in v0.17.0
func NewAccelerometerData() *AccelerometerData
NewAccelerometerData creates a new AccelerometerData.
func (*AccelerometerData) Acceleration ¶ added in v0.18.1
func (ad *AccelerometerData) Acceleration() CMAcceleration
Acceleration returns the acceleration.
type AmbientPressureData ¶ added in v0.17.0
type AmbientPressureData struct {
LogItem
}
AmbientPressureData is an idiomatic wrapper over the Objective-C class CMAmbientPressureData.
It embeds LogItem, promoting that type's methods.
A measurement of the ambient pressure and temperature.
func AmbientPressureDataFromID ¶ added in v0.17.0
func AmbientPressureDataFromID(id objc.ID) *AmbientPressureData
AmbientPressureDataFromID adopts an existing Objective-C object as a AmbientPressureData (nil for 0), retaining it and registering a release finalizer.
func NewAmbientPressureData ¶ added in v0.17.0
func NewAmbientPressureData() *AmbientPressureData
NewAmbientPressureData creates a new AmbientPressureData.
func (*AmbientPressureData) Pressure ¶ added in v0.17.0
func (apd *AmbientPressureData) Pressure() obj.Object
Pressure returns discussion: The pressure as measured by the pressure sensor. Pressure is in kPa (kilopascals).
func (*AmbientPressureData) Temperature ¶ added in v0.17.0
func (apd *AmbientPressureData) Temperature() obj.Object
Temperature returns discussion: The temperature as measured by the pressure sensor. Temperature is in C (degrees centrigrade).
type Attitude ¶ added in v0.17.0
Attitude is an idiomatic wrapper over the Objective-C class CMAttitude.
The device’s orientation relative to a known frame of reference at a point in time.
func AttitudeFromID ¶ added in v0.17.0
AttitudeFromID adopts an existing Objective-C object as a Attitude (nil for 0), retaining it and registering a release finalizer.
func NewAttitude ¶ added in v0.17.0
func NewAttitude() *Attitude
NewAttitude creates a new Attitude.
func (*Attitude) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Attitude) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Attitude) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Attitude) MultiplyByInverseOfAttitude ¶ added in v0.17.0
MultiplyByInverseOfAttitude yields the change in attitude given a specific attitude.
func (*Attitude) Quaternion ¶ added in v0.18.1
func (a *Attitude) Quaternion() CMQuaternion
Quaternion returns the quaternion.
func (*Attitude) RotationMatrix ¶ added in v0.18.1
func (a *Attitude) RotationMatrix() CMRotationMatrix
RotationMatrix returns the rotation matrix.
type AttitudeReferenceFrame ¶ added in v0.17.0
type AttitudeReferenceFrame uint64
Constants that indicate the frame of reference for attitude-related motion data. Bitmask — values may be combined with |.
const ( // A reference frame where the Z axis is vertical and the X axis points in an arbitrary direction in the horizontal plane. AttitudeReferenceFrameXArbitraryZVertical AttitudeReferenceFrame = 1 // A reference frame where the Z axis is vertical and has improved rotation accuracy, and the X axis points in an arbitrary direction in the horizontal plane. AttitudeReferenceFrameXArbitraryCorrectedZVertical AttitudeReferenceFrame = 2 // A reference frame where the Z axis is vertical and the X axis points to the magnetic north pole. AttitudeReferenceFrameXMagneticNorthZVertical AttitudeReferenceFrame = 4 // A reference frame where the Z axis is vertical and the X axis points to the geographic north pole. AttitudeReferenceFrameXTrueNorthZVertical AttitudeReferenceFrame = 8 )
func (AttitudeReferenceFrame) String ¶ added in v0.17.0
func (e AttitudeReferenceFrame) String() string
String returns the AttitudeReferenceFrame constant's name, or its numeric form when the value is not a known constant.
type AuthorizationStatus ¶ added in v0.17.0
type AuthorizationStatus int64
The authorization status for motion-related features.
const ( // The status has not yet been determined. AuthorizationStatusNotDetermined AuthorizationStatus = 0 // Access is denied due to system-wide restrictions. AuthorizationStatusRestricted AuthorizationStatus = 1 // Access was denied by the user. AuthorizationStatusDenied AuthorizationStatus = 2 // Access was granted by the user. AuthorizationStatusAuthorized AuthorizationStatus = 3 )
func CMHeadphoneActivityManagerAuthorizationStatus ¶
func CMHeadphoneActivityManagerAuthorizationStatus() AuthorizationStatus
CMHeadphoneActivityManagerAuthorizationStatus returns the authorization status for monitoring headphone activity.
func CMHeadphoneMotionManagerAuthorizationStatus ¶
func CMHeadphoneMotionManagerAuthorizationStatus() AuthorizationStatus
CMHeadphoneMotionManagerAuthorizationStatus returns the authorization status for monitoring headphone motion.
func (AuthorizationStatus) String ¶ added in v0.17.0
func (e AuthorizationStatus) String() string
String returns the AuthorizationStatus constant's name, or its numeric form when the value is not a known constant.
type CMAcceleration ¶
The type of a structure containing 3-axis acceleration values.
type CMCalibratedMagneticField ¶
type CMCalibratedMagneticField struct {
Field CMMagneticField
Accuracy MagneticFieldCalibrationAccuracy
}
Calibrated magnetic field data and an estimate of the accuracy of the calibration.
type CMMagneticField ¶
A structure containing 3-axis magnetometer data
type CMQuaternion ¶
The type for a quaternion representing a measurement of attitude.
type CMRotationMatrix ¶
type CMRotationMatrix struct {
M11 float64
M12 float64
M13 float64
M21 float64
M22 float64
M23 float64
M31 float64
M32 float64
M33 float64
}
The type of a structure representing a rotation matrix.
type CMRotationRate ¶
The type of structures representing a measurement of rotation rate.
type DeviceMotion ¶ added in v0.17.0
type DeviceMotion struct {
LogItem
}
DeviceMotion is an idiomatic wrapper over the Objective-C class CMDeviceMotion.
It embeds LogItem, promoting that type's methods.
Encapsulated measurements of the attitude, rotation rate, and acceleration of a device.
func DeviceMotionFromID ¶ added in v0.17.0
func DeviceMotionFromID(id objc.ID) *DeviceMotion
DeviceMotionFromID adopts an existing Objective-C object as a DeviceMotion (nil for 0), retaining it and registering a release finalizer.
func NewDeviceMotion ¶ added in v0.17.0
func NewDeviceMotion() *DeviceMotion
NewDeviceMotion creates a new DeviceMotion.
func (*DeviceMotion) Attitude ¶ added in v0.17.0
func (dm *DeviceMotion) Attitude() *Attitude
Attitude returns the attitude.
func (*DeviceMotion) Gravity ¶ added in v0.18.1
func (dm *DeviceMotion) Gravity() CMAcceleration
Gravity returns the gravity.
func (*DeviceMotion) Heading ¶ added in v0.17.0
func (dm *DeviceMotion) Heading() float64
Heading returns the heading.
func (*DeviceMotion) MagneticField ¶ added in v0.18.1
func (dm *DeviceMotion) MagneticField() CMCalibratedMagneticField
MagneticField returns the magnetic field.
func (*DeviceMotion) RotationRate ¶ added in v0.18.1
func (dm *DeviceMotion) RotationRate() CMRotationRate
RotationRate returns the rotation rate.
func (*DeviceMotion) SensorLocation ¶ added in v0.17.0
func (dm *DeviceMotion) SensorLocation() DeviceMotionSensorLocation
SensorLocation returns the sensor location.
func (*DeviceMotion) UserAcceleration ¶ added in v0.18.1
func (dm *DeviceMotion) UserAcceleration() CMAcceleration
UserAcceleration returns the user acceleration.
type DeviceMotionSensorLocation ¶ added in v0.17.0
type DeviceMotionSensorLocation int64
Defines the device’s sensor locations.
const ( DeviceMotionSensorLocationDefault DeviceMotionSensorLocation = 0 DeviceMotionSensorLocationHeadphoneLeft DeviceMotionSensorLocation = 1 DeviceMotionSensorLocationHeadphoneRight DeviceMotionSensorLocation = 2 )
func (DeviceMotionSensorLocation) String ¶ added in v0.17.0
func (e DeviceMotionSensorLocation) String() string
String returns the DeviceMotionSensorLocation constant's name, or its numeric form when the value is not a known constant.
type DispatchAutoreleaseFrequency ¶ added in v0.17.0
type DispatchAutoreleaseFrequency uint64
const ( DispatchAutoreleaseFrequencyInherit DispatchAutoreleaseFrequency = 0 DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1 DispatchAutoreleaseFrequencyNever DispatchAutoreleaseFrequency = 2 )
func (DispatchAutoreleaseFrequency) String ¶ added in v0.17.0
func (e DispatchAutoreleaseFrequency) String() string
String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.
type DispatchBlockFlags ¶ added in v0.17.0
type DispatchBlockFlags uint64
Bitmask — values may be combined with |.
const ( DispatchBlockFlagsBarrier DispatchBlockFlags = 1 DispatchBlockFlagsDetached DispatchBlockFlags = 2 DispatchBlockFlagsAssignCurrent DispatchBlockFlags = 4 DispatchBlockFlagsNoQosClass DispatchBlockFlags = 8 DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16 DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32 )
func (DispatchBlockFlags) String ¶ added in v0.17.0
func (e DispatchBlockFlags) String() string
String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.
type Error ¶ added in v0.17.0
type Error int32
Defines motion errors.
const ( ErrorNULL Error = 100 ErrorDeviceRequiresMovement Error = 101 ErrorTrueNorthNotAvailable Error = 102 ErrorUnknown Error = 103 ErrorMotionActivityNotAvailable Error = 104 ErrorMotionActivityNotAuthorized Error = 105 ErrorMotionActivityNotEntitled Error = 106 ErrorInvalidParameter Error = 107 ErrorInvalidAction Error = 108 ErrorNotAvailable Error = 109 ErrorNotEntitled Error = 110 ErrorNotAuthorized Error = 111 ErrorNilData Error = 112 ErrorSize Error = 113 )
type FilesecProperty ¶ added in v0.17.0
type FilesecProperty int32
const ( FilesecPropertyOwner FilesecProperty = 1 FilesecPropertyGroup FilesecProperty = 2 FilesecPropertyUUID FilesecProperty = 3 FilesecPropertyMode FilesecProperty = 4 FilesecPropertyACL FilesecProperty = 5 FilesecPropertyGrpuuid FilesecProperty = 6 FilesecPropertyACLRaw FilesecProperty = 100 FilesecPropertyACLAllocsize FilesecProperty = 101 )
func (FilesecProperty) String ¶ added in v0.17.0
func (e FilesecProperty) String() string
String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.
type GyroData ¶ added in v0.17.0
type GyroData struct {
LogItem
}
GyroData is an idiomatic wrapper over the Objective-C class CMGyroData.
It embeds LogItem, promoting that type's methods.
A single measurement of the device’s rotation rate.
func GyroDataFromID ¶ added in v0.17.0
GyroDataFromID adopts an existing Objective-C object as a GyroData (nil for 0), retaining it and registering a release finalizer.
func NewGyroData ¶ added in v0.17.0
func NewGyroData() *GyroData
NewGyroData creates a new GyroData.
func (*GyroData) RotationRate ¶ added in v0.18.1
func (gd *GyroData) RotationRate() CMRotationRate
RotationRate returns the rotation rate.
type HeadphoneActivityManager ¶ added in v0.17.0
HeadphoneActivityManager is an idiomatic wrapper over the Objective-C class CMHeadphoneActivityManager.
An object that starts and manages headphone activity services.
func HeadphoneActivityManagerFromID ¶ added in v0.17.0
func HeadphoneActivityManagerFromID(id objc.ID) *HeadphoneActivityManager
HeadphoneActivityManagerFromID adopts an existing Objective-C object as a HeadphoneActivityManager (nil for 0), retaining it and registering a release finalizer.
func NewHeadphoneActivityManager ¶ added in v0.17.0
func NewHeadphoneActivityManager() *HeadphoneActivityManager
NewHeadphoneActivityManager creates a new HeadphoneActivityManager.
func (*HeadphoneActivityManager) Description ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) Description() string
Description returns the object's -description text.
func (*HeadphoneActivityManager) IsActivityActive ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) IsActivityActive() bool
IsActivityActive reports whether the object is activity active.
func (*HeadphoneActivityManager) IsActivityAvailable ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) IsActivityAvailable() bool
IsActivityAvailable reports whether the object is activity available.
func (*HeadphoneActivityManager) IsEqual ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HeadphoneActivityManager) IsKind ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HeadphoneActivityManager) IsStatusActive ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) IsStatusActive() bool
IsStatusActive reports whether the object is status active.
func (*HeadphoneActivityManager) IsStatusAvailable ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) IsStatusAvailable() bool
IsStatusAvailable reports whether the object is status available.
func (*HeadphoneActivityManager) StartActivityUpdatesToQueueWithHandler ¶ added in v0.18.0
func (ham *HeadphoneActivityManager) StartActivityUpdatesToQueueWithHandler(queue obj.Object, handler func(obj.Object, unsafe.Pointer))
StartActivityUpdatesToQueueWithHandler starts headphone activity updates, providing data to the given handler through the given queue.
func (*HeadphoneActivityManager) StartStatusUpdatesToQueueWithHandler ¶ added in v0.18.0
func (ham *HeadphoneActivityManager) StartStatusUpdatesToQueueWithHandler(queue obj.Object, handler func(HeadphoneActivityStatus, unsafe.Pointer))
StartStatusUpdatesToQueueWithHandler starts headphone status updates, providing data to the given handler through the given queue.
func (*HeadphoneActivityManager) StopActivityUpdates ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) StopActivityUpdates()
StopActivityUpdates stops headphone activity updates.
func (*HeadphoneActivityManager) StopStatusUpdates ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) StopStatusUpdates()
StopStatusUpdates stops headphone status updates.
func (*HeadphoneActivityManager) String ¶ added in v0.17.0
func (ham *HeadphoneActivityManager) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type HeadphoneActivityStatus ¶ added in v0.17.0
type HeadphoneActivityStatus int64
Headphone connection status updates.
const ( HeadphoneActivityStatusDisconnected HeadphoneActivityStatus = 0 HeadphoneActivityStatusConnected HeadphoneActivityStatus = 1 )
func (HeadphoneActivityStatus) String ¶ added in v0.17.0
func (e HeadphoneActivityStatus) String() string
String returns the HeadphoneActivityStatus constant's name, or its numeric form when the value is not a known constant.
type HeadphoneMotionManager ¶ added in v0.17.0
HeadphoneMotionManager is an idiomatic wrapper over the Objective-C class CMHeadphoneMotionManager.
An object that starts and manages headphone motion services.
func HeadphoneMotionManagerFromID ¶ added in v0.17.0
func HeadphoneMotionManagerFromID(id objc.ID) *HeadphoneMotionManager
HeadphoneMotionManagerFromID adopts an existing Objective-C object as a HeadphoneMotionManager (nil for 0), retaining it and registering a release finalizer.
func NewHeadphoneMotionManager ¶ added in v0.17.0
func NewHeadphoneMotionManager() *HeadphoneMotionManager
NewHeadphoneMotionManager creates a new HeadphoneMotionManager.
func (*HeadphoneMotionManager) Description ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) Description() string
Description returns the object's -description text.
func (*HeadphoneMotionManager) DeviceMotion ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) DeviceMotion() *DeviceMotion
DeviceMotion returns the device motion.
func (*HeadphoneMotionManager) IsConnectionStatusActive ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) IsConnectionStatusActive() bool
IsConnectionStatusActive reports whether the object is connection status active.
func (*HeadphoneMotionManager) IsDeviceMotionActive ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) IsDeviceMotionActive() bool
IsDeviceMotionActive reports whether the object is device motion active.
func (*HeadphoneMotionManager) IsDeviceMotionAvailable ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) IsDeviceMotionAvailable() bool
IsDeviceMotionAvailable reports whether the object is device motion available.
func (*HeadphoneMotionManager) IsEqual ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*HeadphoneMotionManager) IsKind ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*HeadphoneMotionManager) StartConnectionStatusUpdates ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) StartConnectionStatusUpdates()
StartConnectionStatusUpdates starts connection status updates.
func (*HeadphoneMotionManager) StartDeviceMotionUpdates ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) StartDeviceMotionUpdates()
StartDeviceMotionUpdates starts device-motion updates.
func (*HeadphoneMotionManager) StartDeviceMotionUpdatesToQueueWithHandler ¶ added in v0.18.0
func (hmm *HeadphoneMotionManager) StartDeviceMotionUpdatesToQueueWithHandler(queue obj.Object, handler func(obj.Object, unsafe.Pointer))
StartDeviceMotionUpdatesToQueueWithHandler starts device-motion updates with a handler.
func (*HeadphoneMotionManager) StopConnectionStatusUpdates ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) StopConnectionStatusUpdates()
StopConnectionStatusUpdates stops connection status updates.
func (*HeadphoneMotionManager) StopDeviceMotionUpdates ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) StopDeviceMotionUpdates()
StopDeviceMotionUpdates stops device-motion updates.
func (*HeadphoneMotionManager) String ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*HeadphoneMotionManager) WithDelegate ¶ added in v0.17.0
func (hmm *HeadphoneMotionManager) WithDelegate(delegate HeadphoneMotionManagerDelegate) *HeadphoneMotionManager
WithDelegate sets the object that receives headphone motion manager events.
type HeadphoneMotionManagerDelegate ¶ added in v0.17.0
type HeadphoneMotionManagerDelegate interface {
}
HeadphoneMotionManagerDelegate receives the callbacks of the Objective-C protocol CMHeadphoneMotionManagerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (HeadphoneMotionManagerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type HeadphoneMotionManagerDelegateHeadphoneMotionManagerDidConnectHandler ¶ added in v0.17.0
type HeadphoneMotionManagerDelegateHeadphoneMotionManagerDidConnectHandler interface {
HeadphoneMotionManagerDidConnect(manager *HeadphoneMotionManager)
}
HeadphoneMotionManagerDelegateHeadphoneMotionManagerDidConnectHandler is the optional CMHeadphoneMotionManagerDelegate method headphoneMotionManagerDidConnect:. Implement it on a HeadphoneMotionManagerDelegate value to receive that callback; a value without it is simply never sent one.
type HeadphoneMotionManagerDelegateHeadphoneMotionManagerDidDisconnectHandler ¶ added in v0.17.0
type HeadphoneMotionManagerDelegateHeadphoneMotionManagerDidDisconnectHandler interface {
HeadphoneMotionManagerDidDisconnect(manager *HeadphoneMotionManager)
}
HeadphoneMotionManagerDelegateHeadphoneMotionManagerDidDisconnectHandler is the optional CMHeadphoneMotionManagerDelegate method headphoneMotionManagerDidDisconnect:. Implement it on a HeadphoneMotionManagerDelegate value to receive that callback; a value without it is simply never sent one.
type IpcInfoObjectType ¶ added in v0.17.0
type IpcInfoObjectType uint32
const ( IpcInfoObjectTypeNone IpcInfoObjectType = 0 IpcInfoObjectTypeThreadControl IpcInfoObjectType = 1 IpcInfoObjectTypeTaskControl IpcInfoObjectType = 2 IpcInfoObjectTypeHost IpcInfoObjectType = 3 IpcInfoObjectTypeHostPriv IpcInfoObjectType = 4 IpcInfoObjectTypeProcessor IpcInfoObjectType = 5 IpcInfoObjectTypeProcessorSet IpcInfoObjectType = 6 IpcInfoObjectTypeProcessorSetName IpcInfoObjectType = 7 IpcInfoObjectTypeTimer IpcInfoObjectType = 8 IpcInfoObjectTypePortSubstOnce IpcInfoObjectType = 9 IpcInfoObjectTypeMig IpcInfoObjectType = 10 IpcInfoObjectTypeMemoryObject IpcInfoObjectType = 11 IpcInfoObjectTypeXmmPager IpcInfoObjectType = 12 IpcInfoObjectTypeXmmKernel IpcInfoObjectType = 13 IpcInfoObjectTypeXmmReply IpcInfoObjectType = 14 IpcInfoObjectTypeUndReply IpcInfoObjectType = 15 IpcInfoObjectTypeHostNotify IpcInfoObjectType = 16 IpcInfoObjectTypeHostSecurity IpcInfoObjectType = 17 IpcInfoObjectTypeLedger IpcInfoObjectType = 18 IpcInfoObjectTypeMainDevice IpcInfoObjectType = 19 IpcInfoObjectTypeTaskName IpcInfoObjectType = 20 IpcInfoObjectTypeSubsystem IpcInfoObjectType = 21 IpcInfoObjectTypeIODoneQueue IpcInfoObjectType = 22 IpcInfoObjectTypeSemaphore IpcInfoObjectType = 23 IpcInfoObjectTypeLockSet IpcInfoObjectType = 24 IpcInfoObjectTypeClock IpcInfoObjectType = 25 IpcInfoObjectTypeClockCtrl IpcInfoObjectType = 26 IpcInfoObjectTypeIokitIdent IpcInfoObjectType = 27 IpcInfoObjectTypeNamedEntry IpcInfoObjectType = 28 IpcInfoObjectTypeIokitConnect IpcInfoObjectType = 29 IpcInfoObjectTypeIokitObject IpcInfoObjectType = 30 IpcInfoObjectTypeUpl IpcInfoObjectType = 31 IpcInfoObjectTypeMemObjControl IpcInfoObjectType = 32 IpcInfoObjectTypeAuSessionport IpcInfoObjectType = 33 IpcInfoObjectTypeFileport IpcInfoObjectType = 34 IpcInfoObjectTypeLabelh IpcInfoObjectType = 35 IpcInfoObjectTypeTaskResume IpcInfoObjectType = 36 IpcInfoObjectTypeVoucher IpcInfoObjectType = 37 IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38 IpcInfoObjectTypeWorkInterval IpcInfoObjectType = 39 IpcInfoObjectTypeUxHandler IpcInfoObjectType = 40 IpcInfoObjectTypeUextObject IpcInfoObjectType = 41 IpcInfoObjectTypeArcadeReg IpcInfoObjectType = 42 IpcInfoObjectTypeEventlink IpcInfoObjectType = 43 IpcInfoObjectTypeTaskInspect IpcInfoObjectType = 44 IpcInfoObjectTypeTaskRead IpcInfoObjectType = 45 IpcInfoObjectTypeThreadInspect IpcInfoObjectType = 46 IpcInfoObjectTypeThreadRead IpcInfoObjectType = 47 IpcInfoObjectTypeSuidCred IpcInfoObjectType = 48 IpcInfoObjectTypeHypervisor IpcInfoObjectType = 49 IpcInfoObjectTypeTaskIDToken IpcInfoObjectType = 50 IpcInfoObjectTypeTaskFatal IpcInfoObjectType = 51 IpcInfoObjectTypeKcdata IpcInfoObjectType = 52 IpcInfoObjectTypeExclavesResource IpcInfoObjectType = 53 IpcInfoObjectTypeThreadResume IpcInfoObjectType = 54 IpcInfoObjectTypeUnknown IpcInfoObjectType = 4294967295 )
func (IpcInfoObjectType) String ¶ added in v0.17.0
func (e IpcInfoObjectType) String() string
String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.
type LaunchDataType ¶ added in v0.17.0
type LaunchDataType int32
const ( LaunchDataTypeDictionary LaunchDataType = 1 LaunchDataTypeArray LaunchDataType = 2 LaunchDataTypeFd LaunchDataType = 3 LaunchDataTypeInteger LaunchDataType = 4 LaunchDataTypeReal LaunchDataType = 5 LaunchDataTypeBool LaunchDataType = 6 LaunchDataTypeString LaunchDataType = 7 LaunchDataTypeOpaque LaunchDataType = 8 LaunchDataTypeErrno LaunchDataType = 9 LaunchDataTypeMachport LaunchDataType = 10 )
func (LaunchDataType) String ¶ added in v0.17.0
func (e LaunchDataType) String() string
String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.
type LogItem ¶ added in v0.17.0
LogItem is an idiomatic wrapper over the Objective-C class CMLogItem.
LogItem is an abstract base — you do not construct it directly. Construct one of AccelerometerData, AmbientPressureData, DeviceMotion, GyroData, MagnetometerData, MotionActivity, RotationRateData and pass it where a LogItem is accepted.
The base class for all motion-related data objects.
func LogItemFromID ¶ added in v0.17.0
LogItemFromID adopts an existing Objective-C object as a LogItem (nil for 0), retaining it and registering a release finalizer.
func (*LogItem) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*LogItem) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*LogItem) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
type LogItemProvider ¶ added in v0.17.0
LogItemProvider is accepted wherever a CMLogItem (or one of its subclasses) is expected.
type MDLabelDomain ¶
type MDLabelDomain int32
These constants are used to specify a domain to MDLabelCreate().
const ( KMDLabelUserDomain MDLabelDomain = 0 KMDLabelLocalDomain MDLabelDomain = 1 )
func (MDLabelDomain) String ¶
func (e MDLabelDomain) String() string
String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int32
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int32
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlags ¶ added in v0.17.0
type MachVMRangeFlags uint64
Bitmask — values may be combined with |.
const (
MachVMRangeFlagsNone MachVMRangeFlags = 0
)
func (MachVMRangeFlags) String ¶ added in v0.17.0
func (e MachVMRangeFlags) String() string
String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlavor ¶ added in v0.17.0
type MachVMRangeFlavor uint32
const ( MachVMRangeFlavorInvalid MachVMRangeFlavor = 0 MachVMRangeFlavorV1 MachVMRangeFlavor = 1 )
func (MachVMRangeFlavor) String ¶ added in v0.17.0
func (e MachVMRangeFlavor) String() string
String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeTag ¶ added in v0.17.0
type MachVMRangeTag uint16
const ( MachVMRangeTagDefault MachVMRangeTag = 0 MachVMRangeTagData MachVMRangeTag = 1 MachVMRangeTagFixed MachVMRangeTag = 2 )
func (MachVMRangeTag) String ¶ added in v0.17.0
func (e MachVMRangeTag) String() string
String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.
type MagneticFieldCalibrationAccuracy ¶ added in v0.17.0
type MagneticFieldCalibrationAccuracy int32
Indicates the calibration accuracy of a magnetic field estimate
const ( // The magnetic field estimate is not calibrated. MagneticFieldCalibrationAccuracyUncalibrated MagneticFieldCalibrationAccuracy = -1 // The accuracy of the magnetic field calibration is low. MagneticFieldCalibrationAccuracyLow MagneticFieldCalibrationAccuracy = 0 // The accuracy of the magnetic field calibration is medium. MagneticFieldCalibrationAccuracyMedium MagneticFieldCalibrationAccuracy = 1 // The accuracy of the magnetic field calibration is high. MagneticFieldCalibrationAccuracyHigh MagneticFieldCalibrationAccuracy = 2 )
func (MagneticFieldCalibrationAccuracy) String ¶ added in v0.17.0
func (e MagneticFieldCalibrationAccuracy) String() string
String returns the MagneticFieldCalibrationAccuracy constant's name, or its numeric form when the value is not a known constant.
type MagnetometerData ¶ added in v0.17.0
type MagnetometerData struct {
LogItem
}
MagnetometerData is an idiomatic wrapper over the Objective-C class CMMagnetometerData.
It embeds LogItem, promoting that type's methods.
Measurements of the Earth’s magnetic field relative to the device.
func MagnetometerDataFromID ¶ added in v0.17.0
func MagnetometerDataFromID(id objc.ID) *MagnetometerData
MagnetometerDataFromID adopts an existing Objective-C object as a MagnetometerData (nil for 0), retaining it and registering a release finalizer.
func NewMagnetometerData ¶ added in v0.17.0
func NewMagnetometerData() *MagnetometerData
NewMagnetometerData creates a new MagnetometerData.
func (*MagnetometerData) MagneticField ¶ added in v0.18.1
func (md *MagnetometerData) MagneticField() CMMagneticField
MagneticField returns the magnetic field.
type MotionActivity ¶ added in v0.17.0
type MotionActivity struct {
LogItem
}
MotionActivity is an idiomatic wrapper over the Objective-C class CMMotionActivity.
It embeds LogItem, promoting that type's methods.
The data for a single motion update event.
func MotionActivityFromID ¶ added in v0.17.0
func MotionActivityFromID(id objc.ID) *MotionActivity
MotionActivityFromID adopts an existing Objective-C object as a MotionActivity (nil for 0), retaining it and registering a release finalizer.
func NewMotionActivity ¶ added in v0.17.0
func NewMotionActivity() *MotionActivity
NewMotionActivity creates a new MotionActivity.
func (*MotionActivity) Automotive ¶ added in v0.17.0
func (ma *MotionActivity) Automotive() bool
Automotive wraps the corresponding Objective-C method.
func (*MotionActivity) Confidence ¶ added in v0.17.0
func (ma *MotionActivity) Confidence() MotionActivityConfidence
Confidence returns the confidence.
func (*MotionActivity) Running ¶ added in v0.17.0
func (ma *MotionActivity) Running() bool
Running wraps the corresponding Objective-C method.
func (*MotionActivity) StartDate ¶ added in v0.17.0
func (ma *MotionActivity) StartDate() time.Time
StartDate returns the start date.
func (*MotionActivity) Stationary ¶ added in v0.17.0
func (ma *MotionActivity) Stationary() bool
Stationary wraps the corresponding Objective-C method.
func (*MotionActivity) Unknown ¶ added in v0.17.0
func (ma *MotionActivity) Unknown() bool
Unknown wraps the corresponding Objective-C method.
func (*MotionActivity) Walking ¶ added in v0.17.0
func (ma *MotionActivity) Walking() bool
Walking wraps the corresponding Objective-C method.
type MotionActivityConfidence ¶ added in v0.17.0
type MotionActivityConfidence int64
The confidence that the motion data is accurate.
const ( // Confidence is low. MotionActivityConfidenceLow MotionActivityConfidence = 0 // Confidence is good. MotionActivityConfidenceMedium MotionActivityConfidence = 1 // Confidence is high. MotionActivityConfidenceHigh MotionActivityConfidence = 2 )
func (MotionActivityConfidence) String ¶ added in v0.17.0
func (e MotionActivityConfidence) String() string
String returns the MotionActivityConfidence constant's name, or its numeric form when the value is not a known constant.
type MpoFlags ¶ added in v0.17.0
type MpoFlags uint32
Bitmask — values may be combined with |.
const ( MpoFlagsPort MpoFlags = 0 MpoFlagsServicePort MpoFlags = 1024 MpoFlagsConnectionPort MpoFlags = 2048 MpoFlagsReplyPort MpoFlags = 4096 MpoFlagsWeakReplyPort MpoFlags = 16384 MpoFlagsNotificationPort MpoFlags = 17408 MpoFlagsExceptionPort MpoFlags = 32768 MpoFlagsConnectionPortWithPortArray MpoFlags = 65536 )
type OdometerData ¶ added in v0.17.0
OdometerData is an idiomatic wrapper over the Objective-C class CMOdometerData.
A class that represents odometer data for workouts.
func NewOdometerData ¶ added in v0.17.0
func NewOdometerData() *OdometerData
NewOdometerData creates a new OdometerData.
func OdometerDataFromID ¶ added in v0.17.0
func OdometerDataFromID(id objc.ID) *OdometerData
OdometerDataFromID adopts an existing Objective-C object as a OdometerData (nil for 0), retaining it and registering a release finalizer.
func (*OdometerData) DeltaAltitude ¶ added in v0.18.0
func (od *OdometerData) DeltaAltitude() unsafe.Pointer
DeltaAltitude returns the delta altitude.
func (*OdometerData) DeltaDistance ¶ added in v0.18.0
func (od *OdometerData) DeltaDistance() unsafe.Pointer
DeltaDistance returns the delta distance.
func (*OdometerData) DeltaDistanceAccuracy ¶ added in v0.18.0
func (od *OdometerData) DeltaDistanceAccuracy() unsafe.Pointer
DeltaDistanceAccuracy returns the delta distance accuracy.
func (*OdometerData) Description ¶ added in v0.17.0
func (od *OdometerData) Description() string
Description returns the object's -description text.
func (*OdometerData) EndDate ¶ added in v0.17.0
func (od *OdometerData) EndDate() time.Time
EndDate returns the end date.
func (*OdometerData) GpsDate ¶ added in v0.17.0
func (od *OdometerData) GpsDate() time.Time
GpsDate returns the gps date.
func (*OdometerData) IsEqual ¶ added in v0.17.0
func (od *OdometerData) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*OdometerData) IsKind ¶ added in v0.17.0
func (od *OdometerData) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*OdometerData) MaxAbsSlope ¶ added in v0.17.0
func (od *OdometerData) MaxAbsSlope() *foundation.Number
MaxAbsSlope returns the max abs slope.
func (*OdometerData) OriginDevice ¶ added in v0.17.0
func (od *OdometerData) OriginDevice() OdometerOriginDevice
OriginDevice returns the origin device.
func (*OdometerData) Slope ¶ added in v0.17.0
func (od *OdometerData) Slope() *foundation.Number
Slope returns the slope.
func (*OdometerData) Speed ¶ added in v0.18.0
func (od *OdometerData) Speed() unsafe.Pointer
Speed returns the speed.
func (*OdometerData) SpeedAccuracy ¶ added in v0.18.0
func (od *OdometerData) SpeedAccuracy() unsafe.Pointer
SpeedAccuracy returns the speed accuracy.
func (*OdometerData) StartDate ¶ added in v0.17.0
func (od *OdometerData) StartDate() time.Time
StartDate returns the start date.
func (*OdometerData) String ¶ added in v0.17.0
func (od *OdometerData) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*OdometerData) VerticalAccuracy ¶ added in v0.18.0
func (od *OdometerData) VerticalAccuracy() unsafe.Pointer
VerticalAccuracy returns the vertical accuracy.
type OdometerOriginDevice ¶ added in v0.17.0
type OdometerOriginDevice int64
The device that the odometer sample originates from.
const ( // The origin of the odometer sample is unknown. OdometerOriginDeviceUnknown OdometerOriginDevice = 0 // The origin of the odometer sample comes from the same device that requests the sample. OdometerOriginDeviceLocal OdometerOriginDevice = 1 // The origin of the odometer sample comes from a device that’s paired with the local device. OdometerOriginDeviceRemote OdometerOriginDevice = 2 )
func (OdometerOriginDevice) String ¶ added in v0.17.0
func (e OdometerOriginDevice) String() string
String returns the OdometerOriginDevice constant's name, or its numeric form when the value is not a known constant.
type Pedometer ¶ added in v0.17.0
Pedometer is an idiomatic wrapper over the Objective-C class CMPedometer.
An object for fetching the system-generated live walking data.
func NewPedometer ¶ added in v0.17.0
func NewPedometer() *Pedometer
NewPedometer creates a new Pedometer.
func PedometerFromID ¶ added in v0.17.0
PedometerFromID adopts an existing Objective-C object as a Pedometer (nil for 0), retaining it and registering a release finalizer.
func (*Pedometer) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Pedometer) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Pedometer) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Pedometer) QueryPedometerDataFromDateToDateWithHandler ¶ added in v0.18.0
func (p *Pedometer) QueryPedometerDataFromDateToDateWithHandler(start time.Time, end time.Time, handler func(obj.Object, unsafe.Pointer))
QueryPedometerDataFromDateToDateWithHandler retrieves the data between the specified start and end dates.
func (*Pedometer) StartPedometerUpdatesFromDateWithHandler ¶ added in v0.18.0
func (p *Pedometer) StartPedometerUpdatesFromDateWithHandler(start time.Time, handler func(obj.Object, unsafe.Pointer))
StartPedometerUpdatesFromDateWithHandler starts the delivery of recent pedestrian-related data to your app.
func (*Pedometer) StopPedometerUpdates ¶ added in v0.17.0
func (p *Pedometer) StopPedometerUpdates()
StopPedometerUpdates stops the delivery of recent pedestrian data updates to your app.
type PedometerData ¶ added in v0.17.0
PedometerData is an idiomatic wrapper over the Objective-C class CMPedometerData.
Information about the distance traveled by a user on foot.
func NewPedometerData ¶ added in v0.17.0
func NewPedometerData() *PedometerData
NewPedometerData creates a new PedometerData.
func PedometerDataFromID ¶ added in v0.17.0
func PedometerDataFromID(id objc.ID) *PedometerData
PedometerDataFromID adopts an existing Objective-C object as a PedometerData (nil for 0), retaining it and registering a release finalizer.
func (*PedometerData) AverageActivePace ¶ added in v0.18.0
func (pd *PedometerData) AverageActivePace() unsafe.Pointer
AverageActivePace returns the average active pace.
func (*PedometerData) CurrentCadence ¶ added in v0.18.0
func (pd *PedometerData) CurrentCadence() unsafe.Pointer
CurrentCadence returns the current cadence.
func (*PedometerData) CurrentPace ¶ added in v0.18.0
func (pd *PedometerData) CurrentPace() unsafe.Pointer
CurrentPace returns the current pace.
func (*PedometerData) Description ¶ added in v0.17.0
func (pd *PedometerData) Description() string
Description returns the object's -description text.
func (*PedometerData) Distance ¶ added in v0.17.0
func (pd *PedometerData) Distance() *foundation.Number
Distance returns the distance.
func (*PedometerData) EndDate ¶ added in v0.17.0
func (pd *PedometerData) EndDate() time.Time
EndDate returns the end date.
func (*PedometerData) FloorsAscended ¶ added in v0.17.0
func (pd *PedometerData) FloorsAscended() *foundation.Number
FloorsAscended returns the floors ascended.
func (*PedometerData) FloorsDescended ¶ added in v0.17.0
func (pd *PedometerData) FloorsDescended() *foundation.Number
FloorsDescended returns the floors descended.
func (*PedometerData) IsEqual ¶ added in v0.17.0
func (pd *PedometerData) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*PedometerData) IsKind ¶ added in v0.17.0
func (pd *PedometerData) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*PedometerData) NumberOfSteps ¶ added in v0.17.0
func (pd *PedometerData) NumberOfSteps() *foundation.Number
NumberOfSteps returns the number of steps.
func (*PedometerData) StartDate ¶ added in v0.17.0
func (pd *PedometerData) StartDate() time.Time
StartDate returns the start date.
func (*PedometerData) String ¶ added in v0.17.0
func (pd *PedometerData) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type PedometerEvent ¶ added in v0.17.0
PedometerEvent is an idiomatic wrapper over the Objective-C class CMPedometerEvent.
A change in the user’s pedestrian activity.
func NewPedometerEvent ¶ added in v0.17.0
func NewPedometerEvent() *PedometerEvent
NewPedometerEvent creates a new PedometerEvent.
func PedometerEventFromID ¶ added in v0.17.0
func PedometerEventFromID(id objc.ID) *PedometerEvent
PedometerEventFromID adopts an existing Objective-C object as a PedometerEvent (nil for 0), retaining it and registering a release finalizer.
func (*PedometerEvent) Date ¶ added in v0.17.0
func (pe *PedometerEvent) Date() time.Time
Date returns the date.
func (*PedometerEvent) Description ¶ added in v0.17.0
func (pe *PedometerEvent) Description() string
Description returns the object's -description text.
func (*PedometerEvent) IsEqual ¶ added in v0.17.0
func (pe *PedometerEvent) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*PedometerEvent) IsKind ¶ added in v0.17.0
func (pe *PedometerEvent) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*PedometerEvent) String ¶ added in v0.17.0
func (pe *PedometerEvent) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*PedometerEvent) Type ¶ added in v0.17.0
func (pe *PedometerEvent) Type() PedometerEventType
Type returns the type.
type PedometerEventType ¶ added in v0.17.0
type PedometerEventType int64
Constants indicating the change that occurred to the user’s pedestrian activity.
const ( // The user’s pedestrian activity stopped. PedometerEventTypePause PedometerEventType = 0 // The user’s pedestrian activity resumed. PedometerEventTypeResume PedometerEventType = 1 )
func (PedometerEventType) String ¶ added in v0.17.0
func (e PedometerEventType) String() string
String returns the PedometerEventType constant's name, or its numeric form when the value is not a known constant.
type Perm ¶ added in v0.17.0
type Perm int32
const ( PermReadData Perm = 2 PermListDirectory Perm = 2 PermWriteData Perm = 4 PermAddFile Perm = 4 PermExecute Perm = 8 PermSearch Perm = 8 PermDelete Perm = 16 PermAppendData Perm = 32 PermAddSubdirectory Perm = 32 PermDeleteChild Perm = 64 PermReadAttributes Perm = 128 PermWriteAttributes Perm = 256 PermReadExtattributes Perm = 512 PermWriteExtattributes Perm = 1024 PermReadSecurity Perm = 2048 PermWriteSecurity Perm = 4096 PermChangeOwner Perm = 8192 PermSynchronize Perm = 1048576 )
type PtrauthKey ¶ added in v0.17.0
type PtrauthKey int32
const ( Ptrauth_key_none PtrauthKey = -1 Ptrauth_key_asia PtrauthKey = 0 Ptrauth_key_asib PtrauthKey = 1 Ptrauth_key_asda PtrauthKey = 2 Ptrauth_key_asdb PtrauthKey = 3 Ptrauth_key_process_independent_code PtrauthKey = 0 Ptrauth_key_process_dependent_code PtrauthKey = 1 Ptrauth_key_process_independent_data PtrauthKey = 2 Ptrauth_key_process_dependent_data PtrauthKey = 3 Ptrauth_key_return_address PtrauthKey = 1 Ptrauth_key_frame_pointer PtrauthKey = 3 Ptrauth_key_function_pointer PtrauthKey = 0 Ptrauth_key_block_function PtrauthKey = 0 Ptrauth_key_cxx_vtable_pointer PtrauthKey = 2 Ptrauth_key_method_list_pointer PtrauthKey = 2 Ptrauth_key_objc_isa_pointer PtrauthKey = 2 Ptrauth_key_objc_super_pointer PtrauthKey = 2 Ptrauth_key_objc_sel_pointer PtrauthKey = 3 Ptrauth_key_objc_class_ro_pointer PtrauthKey = 2 Ptrauth_key_block_descriptor_pointer PtrauthKey = 2 Ptrauth_key_init_fini_pointer PtrauthKey = 0 )
func (PtrauthKey) String ¶ added in v0.17.0
func (e PtrauthKey) String() string
String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.
type RecordedRotationRateData ¶ added in v0.17.0
type RecordedRotationRateData struct {
RotationRateData
}
RecordedRotationRateData is an idiomatic wrapper over the Objective-C class CMRecordedRotationRateData.
It embeds RotationRateData, promoting that type's methods.
A data object that contains a single rotation-rate measurement at a specific time.
func NewRecordedRotationRateData ¶ added in v0.17.0
func NewRecordedRotationRateData() *RecordedRotationRateData
NewRecordedRotationRateData creates a new RecordedRotationRateData.
func RecordedRotationRateDataFromID ¶ added in v0.17.0
func RecordedRotationRateDataFromID(id objc.ID) *RecordedRotationRateData
RecordedRotationRateDataFromID adopts an existing Objective-C object as a RecordedRotationRateData (nil for 0), retaining it and registering a release finalizer.
func (*RecordedRotationRateData) StartDate ¶ added in v0.17.0
func (rrrd *RecordedRotationRateData) StartDate() time.Time
StartDate returns the start date.
type RotationRateData ¶ added in v0.17.0
type RotationRateData struct {
LogItem
}
RotationRateData is an idiomatic wrapper over the Objective-C class CMRotationRateData.
RotationRateData is an abstract base — you do not construct it directly. Construct one of RecordedRotationRateData and pass it where a RotationRateData is accepted.
A data object that contains a single rotation-rate measurement.
func RotationRateDataFromID ¶ added in v0.17.0
func RotationRateDataFromID(id objc.ID) *RotationRateData
RotationRateDataFromID adopts an existing Objective-C object as a RotationRateData (nil for 0), retaining it and registering a release finalizer.
func (*RotationRateData) RotationRate ¶ added in v0.18.1
func (rrd *RotationRateData) RotationRate() CMRotationRate
RotationRate returns the rotation rate.
type RotationRateDataProvider ¶ added in v0.17.0
type RotationRateDataProvider interface {
objref.Object
// contains filtered or unexported methods
}
RotationRateDataProvider is accepted wherever a CMRotationRateData (or one of its subclasses) is expected.
type VirtualMemoryGuardExceptionCode ¶ added in v0.17.0
type VirtualMemoryGuardExceptionCode uint32
const ( KGUARD_EXC_DEALLOC_GAP VirtualMemoryGuardExceptionCode = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE VirtualMemoryGuardExceptionCode = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE VirtualMemoryGuardExceptionCode = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE VirtualMemoryGuardExceptionCode = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE VirtualMemoryGuardExceptionCode = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE VirtualMemoryGuardExceptionCode = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE VirtualMemoryGuardExceptionCode = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION VirtualMemoryGuardExceptionCode = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY VirtualMemoryGuardExceptionCode = 13 KGUARD_EXC_SEC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 99 KGUARD_EXC_SEC_COPY_DENIED VirtualMemoryGuardExceptionCode = 100 KGUARD_EXC_SEC_SHARING_DENIED VirtualMemoryGuardExceptionCode = 101 KGUARD_EXC_MTE_SYNC_FAULT VirtualMemoryGuardExceptionCode = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204 )
func (VirtualMemoryGuardExceptionCode) String ¶ added in v0.17.0
func (e VirtualMemoryGuardExceptionCode) String() string
String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.
type WaterSubmersionDepthState ¶ added in v0.17.0
type WaterSubmersionDepthState int64
A state based on the device’s depth under water.
const ( WaterSubmersionDepthStateUnknown WaterSubmersionDepthState = 0 WaterSubmersionDepthStateNotSubmerged WaterSubmersionDepthState = 100 WaterSubmersionDepthStateSubmergedShallow WaterSubmersionDepthState = 200 WaterSubmersionDepthStateSubmergedDeep WaterSubmersionDepthState = 300 WaterSubmersionDepthStateApproachingMaxDepth WaterSubmersionDepthState = 400 WaterSubmersionDepthStatePastMaxDepth WaterSubmersionDepthState = 500 WaterSubmersionDepthStateSensorDepthError WaterSubmersionDepthState = 600 )
func (WaterSubmersionDepthState) String ¶ added in v0.17.0
func (e WaterSubmersionDepthState) String() string
String returns the WaterSubmersionDepthState constant's name, or its numeric form when the value is not a known constant.
type WaterSubmersionState ¶ added in v0.17.0
type WaterSubmersionState int64
The device’s submersion state.
const ( WaterSubmersionStateUnknown WaterSubmersionState = 0 WaterSubmersionStateNotSubmerged WaterSubmersionState = 1 WaterSubmersionStateSubmerged WaterSubmersionState = 2 )
func (WaterSubmersionState) String ¶ added in v0.17.0
func (e WaterSubmersionState) String() string
String returns the WaterSubmersionState constant's name, or its numeric form when the value is not a known constant.
type XpcListenerCreateFlags ¶ added in v0.17.0
type XpcListenerCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcListenerCreateFlagsNone XpcListenerCreateFlags = 0 XpcListenerCreateFlagsInactive XpcListenerCreateFlags = 1 XpcListenerCreateFlagsForceMach XpcListenerCreateFlags = 2 XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4 )
func (XpcListenerCreateFlags) String ¶ added in v0.17.0
func (e XpcListenerCreateFlags) String() string
String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.
type XpcSessionCreateFlags ¶ added in v0.17.0
type XpcSessionCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcSessionCreateFlagsNone XpcSessionCreateFlags = 0 XpcSessionCreateFlagsInactive XpcSessionCreateFlags = 1 XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2 )
func (XpcSessionCreateFlags) String ¶ added in v0.17.0
func (e XpcSessionCreateFlags) String() string
String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.
Source Files
¶
- CMAccelerometerData_generated.go
- CMAmbientPressureData_generated.go
- CMAttitude_generated.go
- CMDeviceMotion_generated.go
- CMGyroData_generated.go
- CMHeadphoneActivityManager_generated.go
- CMHeadphoneMotionManagerDelegate_delegate_generated.go
- CMHeadphoneMotionManager_generated.go
- CMLogItem_generated.go
- CMMagnetometerData_generated.go
- CMMotionActivity_generated.go
- CMOdometerData_generated.go
- CMPedometerData_generated.go
- CMPedometerEvent_generated.go
- CMPedometer_generated.go
- CMRecordedRotationRateData_generated.go
- CMRotationRateData_generated.go
- coremotion_classmethods_generated.go
- coremotion_constants_generated.go
- coremotion_enums_generated.go
- coremotion_providers_generated.go
- coremotion_runtime_generated.go
- coremotion_structs_generated.go
- doc.go