Promote subsystem namespaces to the top level of the module
System, Display, Graphics, Sprite, Sound, File, JSON, Lua, Scoreboards, Network, Rect, SystemEvent, and AccessReply now live at module scope instead of being nested in the Playdate enum; consumers write System.log(...) instead of Playdate.System.log(...), and can qualify with the module name (PlayDate.System) on collision. The Playdate enum remains only as the raw C API bootstrap (initialize(with:), api, apiPointer), and Playdate.Error is renamed PlaydateError so no top-level type shadows Swift.Error. Breaking change for any existing consumers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,12 +5,10 @@
|
||||
|
||||
internal import CPlaydate
|
||||
|
||||
extension Playdate {
|
||||
/// The display API: resolution, refresh rate, scaling, and effects.
|
||||
public enum Display {}
|
||||
}
|
||||
/// The display API: resolution, refresh rate, scaling, and effects.
|
||||
public enum Display {}
|
||||
|
||||
extension Playdate.Display {
|
||||
extension Display {
|
||||
private static var api: playdate_display { Playdate.api.display.pointee }
|
||||
|
||||
/// The display width in pixels, taking the current scale into account.
|
||||
|
||||
Reference in New Issue
Block a user