Ejemplo n.º 1
0
        internal static void InvokeKey(GlFwForm f, Key key, int scanCode, KeyActionKind keyAction, KeyModifiers mods)
        {
            switch (keyAction)
            {
            default: throw new NotFiniteNumberException();

            case KeyActionKind.Press:
                f.OnKeyDown(key, scanCode, mods);
                break;

            case KeyActionKind.Repeat:
                f.OnKeyRepeat(key, scanCode, mods);
                break;

            case KeyActionKind.Release:
                f.OnKeyUp(key, scanCode, mods);
                break;
            }
        }
Ejemplo n.º 2
0
        internal static void InvokeMouseButton(GlFwForm f, MouseButton btn, KeyActionKind action)
        {
            //TODO: implement detail methods
            switch (action)
            {
            default: throw new NotSupportedException();

            case KeyActionKind.Press:
                f.OnMouseDown(btn, f._latestMouseX, f._latestMouseY);
                break;

            case KeyActionKind.Release:
                f.OnMouseUp(btn, f._latestMouseX, f._latestMouseY);
                break;

            case KeyActionKind.Repeat:
                break;
            }
        }