<commit_before>// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Linq;
using Avalonia.Controls;
using Avalonia.Controls.Platform.Surfaces;
using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Native.Interop;
using Avalonia.OpenGL;
using Avalonia.Platform;
using Avalonia.Rendering;
using Avalonia.Threading;

namespace Avalonia.Native
{
    public class MacOSTopLevelWindowHandle : IPlatformHandle, IMacOSTopLevelPlatformHandle
    {
        IAvnWindowBase _native;

        public MacOSTopLevelWindowHandle(IAvnWindowBase native)
        {
            _native = native;
        }

        public IntPtr Handle => IntPtr.Zero;

        public string HandleDescriptor => "NOT SUPPORTED";

        public IntPtr NSView => _native.ObtainNSViewHandle();

        public IntPtr NSWindow => _native.ObtainNSWindowHandle();

        public IntPtr GetNSViewRetained()
        {
            return _native.ObtainNSViewHandleRetained();
        }

        public IntPtr GetNSWindowRetained()
        {
            return _native.ObtainNSWindowHandleRetained();
        }
    }

    public abstract class WindowBaseImpl : IWindowBaseImpl,
        IFramebufferPlatformSurface
    {
        IInputRoot _inputRoot;
        IAvnWindowBase _native;
        private object _syncRoot = new object();
        private bool _deferredRendering = false;<commit_msg>make the default handle the NSWindow.<commit_after>// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Linq;
using Avalonia.Controls;
using Avalonia.Controls.Platform.Surfaces;
using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Native.Interop;
using Avalonia.OpenGL;
using Avalonia.Platform;
using Avalonia.Rendering;
using Avalonia.Threading;

namespace Avalonia.Native
{
    public class MacOSTopLevelWindowHandle : IPlatformHandle, IMacOSTopLevelPlatformHandle
    {
        IAvnWindowBase _native;

        public MacOSTopLevelWindowHandle(IAvnWindowBase native)
        {
            _native = native;
        }

        public IntPtr Handle => NSWindow;

        public string HandleDescriptor => "NSWindow";

        public IntPtr NSView => _native.ObtainNSViewHandle();

        public IntPtr NSWindow => _native.ObtainNSWindowHandle();

        public IntPtr GetNSViewRetained()
        {
            return _native.ObtainNSViewHandleRetained();
        }

        public IntPtr GetNSWindowRetained()
        {
            return _native.ObtainNSWindowHandleRetained();
        }
    }

    public abstract class WindowBaseImpl : IWindowBaseImpl,
        IFramebufferPlatformSurface
    {
        IInputRoot _inputRoot;
        IAvnWindowBase _native;
        private object _syncRoot = new object();
        private bool _deferredRendering = false;
{'fraction_non_alphanumeric': 0.06701366297983084, 'fraction_numerical': 0.0, 'mean_word_length': 3.0513833992094863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2749061', 'n_tokens_mistral': 844, 'n_tokens_neox': 833, 'n_words': 221}