agra
bd3033dc5a
ffi 3.2 C5: migrate uikit.sx view tree + GL drawables cluster
Final Phase 3.2 cluster. CALayer / CAEAGLLayer / EAGLContext declared
as `#foreign #objc_class` blocks, plus `setContentScaleFactor` added
to UIView and `-layer` now returns `*CALayer` (was opaque `*void`).
Classes declared:
- CALayer → setOpaque (instance)
- CAEAGLLayer → setDrawableProperties (instance)
- EAGLContext → alloc (class), initWithAPI (instance),
setCurrentContext (class — takes EAGLContext arg),
renderbufferStorage_fromDrawable (instance),
presentRenderbuffer (instance)
- UIView → +setContentScaleFactor (existing decl extended)
The C5 group sits above UIView in the file so the `-layer` return type
`*CALayer` forward-resolves cleanly.
Migration sites in uikit.sx:
- `uikit_create_gl_context` → `EAGLContext.alloc().initWithAPI(api)`
+ `EAGLContext.setCurrentContext(ctx)`.
- `uikit_setup_renderbuffer` → cast `*EAGLContext` and
`gl_ctx.renderbufferStorage_fromDrawable(target, layer)`.
- `uikit_present_renderbuffer` → same cast + `presentRenderbuffer(target)`.
- Scene-connect bring-up: `gl_layer.setOpaque(1)`,
`eagl_layer.setDrawableProperties(...)`,
`gl_view.setContentScaleFactor(scale)`.
One more `objc_getClass(...)` lookup (EAGLContext) retired — the class
slot comes from the declarative binding via `__sx_objc_class_init`.
**Phase 3.2 complete.** Five clusters migrated (C1: Foundation
utility; C2: Notifications + Bundle; C3: RunLoop + display timing;
C4: UIKit chrome; C5: view tree + GL drawables). 8 foreign Cocoa
classes declared; ~30 `#objc_call(T)(...)` sites rewritten to
`recv.method(args)` / `Cls.method(args)`; 6 `objc_getClass`
lookups retired. Sx-defined classes (SxAppDelegate, SxSceneDelegate,
SxGLView, SxMetalView) and a handful of foreign sites that exercise
delegate/protocol surfaces stay on the explicit `#objc_call` form
pending Phase 3.7's class synthesis.
167/167 example tests; chess clean on macOS / iOS sim / Android via
`tools/verify-step.sh`.
2026-05-25 17:58:55 +03:00
..
2026-05-25 14:41:17 +03:00
2026-05-17 13:49:25 +03:00
2026-05-25 17:58:55 +03:00
2026-05-25 09:35:15 +03:00
2026-05-17 13:49:25 +03:00
2026-05-25 15:33:28 +03:00
2026-05-25 15:33:28 +03:00
2026-05-23 01:28:32 +03:00
2026-05-22 19:03:31 +03:00
2026-05-25 09:35:15 +03:00
2026-05-22 19:03:31 +03:00
2026-05-17 13:49:25 +03:00
2026-05-17 14:38:58 +03:00
2026-05-17 13:49:25 +03:00
2026-05-17 13:49:25 +03:00
2026-05-17 13:49:25 +03:00
2026-05-25 14:41:17 +03:00
2026-05-17 13:49:25 +03:00
2026-05-24 22:59:20 +03:00
2026-05-17 13:49:25 +03:00