示例#1
0
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (input_context != IntPtr.Zero)
                {
                    Debug.Print("[Input] Destroying libinput context");
                    LibInput.Suspend(input_context);
                    Interlocked.Increment(ref exit);

                    LibInput.DestroyContext(input_context);
                    input_context = IntPtr.Zero;
                }

                if (udev != IntPtr.Zero)
                {
                    Debug.Print("[Input] Destroying udev context");
                    Udev.Destroy(udev);
                    udev = IntPtr.Zero;
                }

                input_interface = null;
            }
            else
            {
                Debug.Print("[Input] {0} leaked. Did you forget to call Dispose()?", GetType().FullName);
            }
        }
示例#2
0
 public static extern IntPtr CreateContext(InputInterface @interface,
                                           IntPtr user_data, IntPtr udev);
示例#3
0
 public static extern IntPtr CreateContext(InputInterface @interface,
     IntPtr user_data, IntPtr udev, string seat_id);
示例#4
0
 public static extern IntPtr CreateContext(InputInterface @interface,
                                           IntPtr user_data, IntPtr udev, string seat_id);
示例#5
0
        void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (input_context != IntPtr.Zero)
                {
                    Debug.Print("[Input] Destroying libinput context");
                    LibInput.Suspend(input_context);
                    Interlocked.Increment(ref exit);

                    LibInput.DestroyContext(input_context);
                    input_context = IntPtr.Zero;
                }

                if (udev != IntPtr.Zero)
                {
                    Debug.Print("[Input] Destroying udev context");
                    Udev.Destroy(udev);
                    udev = IntPtr.Zero;
                }

                input_interface = null;
            }
            else
            {
                Debug.Print("[Input] {0} leaked. Did you forget to call Dispose()?", GetType().FullName);
            }
        }