feat(interop): add safe handle wrappers and configuration options
Implement SafeHandle wrappers for native resources (SafeGtkWidgetHandle, SafeGObjectHandle, SafeX11DisplayHandle, SafeX11CursorHandle, SafeDlopenHandle) to prevent memory leaks. Move gesture and rendering configuration from static properties to LinuxApplicationOptions for better testability and DI compatibility. Add THREADING.md and DI-MIGRATION.md documentation. Include LayoutIntegrationTests for Measure/Arrange pipeline and SkiaViewTheoryTests with parameterized test cases using [Theory] attributes.
This commit is contained in:
@@ -238,6 +238,17 @@ public partial class LinuxApplication : IDisposable
|
||||
/// </summary>
|
||||
public void Initialize(LinuxApplicationOptions options)
|
||||
{
|
||||
// Apply gesture configuration
|
||||
Handlers.GestureManager.SwipeMinDistance = options.SwipeMinDistance;
|
||||
Handlers.GestureManager.SwipeMaxTime = options.SwipeMaxTime;
|
||||
Handlers.GestureManager.SwipeDirectionThreshold = options.SwipeDirectionThreshold;
|
||||
Handlers.GestureManager.PanMinDistance = options.PanMinDistance;
|
||||
Handlers.GestureManager.PinchScrollScale = options.PinchScrollScale;
|
||||
|
||||
// Apply rendering configuration
|
||||
SkiaRenderingEngine.MaxDirtyRegions = options.MaxDirtyRegions;
|
||||
SkiaRenderingEngine.RegionMergeThreshold = options.RegionMergeThreshold;
|
||||
|
||||
_useGtk = options.UseGtk;
|
||||
if (_useGtk)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user