示例#1
0
            public override void DraggedImageEndedAtOperation(NSImage image, CGPoint screenPoint, NSDragOperation operation)
            {
                //Console.WriteLine($"MonoDraggingSource.DraggedImageEndedAtOperation({screenPoint.X},{screenPoint.Y},{operation}");

                XplatUICocoa.DraggedData     = null;
                XplatUICocoa.DraggingEffects = operation.ToDragDropEffects();
                XplatUICocoa.DraggingEnded(this, new EventArgs());
                XplatUICocoa.LastMouseDown = null;
            }
示例#2
0
        static XplatUI()
        {
            // Compose name with current domain id because on Win32 we register class name
            // and name must be unique to process. If we load MWF into multiple appdomains
            // and try to register same class name we fail.
//			default_class_name = "SWFClass" + System.Threading.Thread.GetDomainID ().ToString ();

            if (RunningOnUnix)
            {
#if NO_X11
#if NO_CARBON
                driver = XplatUICocoa.GetInstance();
#else
                driver = XplatUICarbon.GetInstance();
#endif
#else
                //if (Environment.GetEnvironmentVariable ("not_supported_MONO_MWF_USE_NEW_X11_BACKEND") != null) {
                //        driver=XplatUIX11_new.GetInstance ();
                //} else
                if (Environment.GetEnvironmentVariable("MONO_MWF_MAC_FORCE_X11") != null)
                {
                    driver = XplatUIX11.GetInstance();
                }
                else
                {
                    IntPtr buf = Marshal.AllocHGlobal(8192);
                    // This is a hacktastic way of getting sysname from uname ()
                    if (uname(buf) != 0)
                    {
                        // WTF: We cannot run uname
                        driver = XplatUIX11.GetInstance();
                    }
                    else
                    {
                        string os = Marshal.PtrToStringAnsi(buf);
                        if (os == "Darwin")
#if NO_CARBON
                        { driver = XplatUICocoa.GetInstance(); }
#else
                        { driver = XplatUICarbon.GetInstance(); }
#endif
                        else
                        {
                            driver = XplatUIX11.GetInstance();
                        }
                    }
示例#3
0
        static XplatUI()
        {
#if XAMARINMAC
            driver = XplatUICocoa.GetInstance();
#else
            driver = XplatUIWin32.GetInstance();
#endif

            driver.InitializeDriver();

            // Initialize things that need to be done after the driver is ready
            DataFormats.GetFormat(0);

            // Signal that the Application loop can be run.
            // This allows UIA to initialize a11y support for MWF
            // before the main loop begins.
            Application.FirePreRun();
        }
示例#4
0
 public FileProvider(XplatUICocoa driver)
 {
     this.driver = driver;
     driver.dndCurrentFileIndex = 0;
 }