Platforms to show: All Mac Windows Linux Cross-Platform
CADisplayLinkMBS class New in 26.0
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| class | Cocoa | MBS MacCocoa Plugin | 26.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Your app initializes a new display link by providing an Action event to call when the system updates the screen. The event can read the display link’s timestamp property to retrieve the time the system displayed the previous frame. For example, an app that displays movies might use timestamp to calculate which video frame to display next. An app that performs its own animations might use timestamp to determine where and how visible objects appear in the upcoming frame.
The duration property provides the amount of time between frames at the maximumFramesPerSecond. To calculate the actual frame duration, use targetTimestamp - timestamp. You can use this value in your app to calculate the frame rate of the display, the approximate time the system displays the next frame, and to adjust the drawing behavior so that the next frame is ready in time to display.
Your app can disable notifications by setting paused to true. Also, if your app can’t provide frames in the time the system provides, you may want to choose a slower frame rate. An app with a slower but consistent frame rate appears smoother to the user than an app that skips frames. You can define the number of frames per second by setting preferredFramesPerSecond.
When your app finishes with a display link, call invalidate to remove it from all run loops and to disassociate it from the target.
- event Action
- 8 properties
- property duration as Double
- property frameInterval as Double
- property Handle as Integer
- property paused as Boolean
- property preferredFramesPerSecond as Double
- property tag as Variant
- property targetTimestamp as Double
- property timestamp as Double
- 3 methods
- method Constructor
- method Constructor(target as Variant)
- method invalidate
This class has no sub classes.
Release notes
- Version 25.6
- Added CADisplayLinkMBS class.
The items on this page are in the following plugins: MBS MacCocoa Plugin.