示例#1
0
            internal KeyboardEvent(EventUnion union)
            {
                var types = new[] {
                    EventType.KeyChar,
                    EventType.KeyDown,
                    EventType.KeyUp
                };

                Debug.Assert(types.Contains(union.type), "Bad union tag");

                DisplayHandle = union.display;
                KeyCode       = union.keyCode;
                Character     = union.uniChar;
                Modifiers     = union.modifiers;
                Repeat        = union.repeat != 0;
                Type          = union.type;
            }
示例#2
0
            internal KeyboardEvent(EventUnion union)
            {
                var types = new[] {
                    EventType.KeyChar,
                    EventType.KeyDown,
                    EventType.KeyUp
                };

                Debug.Assert(types.Contains(union.type), "Bad union tag");

                DisplayHandle = union.display;
                KeyCode = union.keyCode;
                Character = union.uniChar;
                Modifiers = union.modifiers;
                Repeat = union.repeat != 0;
                Type = union.type;
            }
示例#3
0
 public static extern bool GetNextEventImpl(IntPtr handle, out EventUnion @event);
示例#4
0
 public static extern bool GetNextEventImpl(IntPtr handle, out EventUnion @event);