コード例 #1
0
        public void AccessibilityDoGestureSignalSetResult()
        {
            tlog.Debug(tag, $"AccessibilityDoGestureSignalSetResult START");

            using (View view = new View())
            {
                view.OnWindowSignal();

                AccessibilityDoGestureSignal.SetResult(view.SwigCPtr.Handle, true);
                var result = AccessibilityDoGestureSignal.GetResult(view.SwigCPtr.Handle);
                tlog.Debug(tag, "Result : " + result);
            }

            tlog.Debug(tag, $"AccessibilityDoGestureSignalSetResult END (OK)");
        }
コード例 #2
0
        private void OnAccessibilityGestureInfoEvent(IntPtr data)
        {
            if (data == IntPtr.Zero)
            {
                return;
            }

            if (Marshal.SizeOf <GestureInfoType>() != AccessibilityDoGestureSignal.GetSizeOfGestureInfo())
            {
                throw new global::System.ApplicationException("ABI mismatch SizeOf(C# GestureInfo) != SizeOf(c++ GestureInfo)");
            }

            var arg = new GestureInfoEventArgs();

            arg.Consumed    = AccessibilityDoGestureSignal.GetResult(data);
            arg.GestureInfo = (GestureInfoType)Marshal.PtrToStructure(data, typeof(GestureInfoType));

            gestureInfoHandler?.Invoke(this, arg);

            AccessibilityDoGestureSignal.SetResult(data, Convert.ToInt32(arg.Consumed));
        }