Ejemplo n.º 1
0
 public void NextRawEvent(ref AL5.Events.ALEvent evt)
 {
     AL5.Events.al_get_next_event(mHandle, ref evt);
 }
Ejemplo n.º 2
0
 public void Dispatch(ref AL5.Events.ALEvent evt)
 {
     switch (evt.type)
     {
         case AL5.Events.EVENT_JOYSTICK_AXIS:
             if (OnJoystickAxis != null)
                 OnJoystickAxis(ref evt.joystick);
             break;
         case AL5.Events.EVENT_JOYSTICK_BUTTON_DOWN:
             if (OnJoystickButtonDown != null)
                 OnJoystickButtonDown(ref evt.joystick);
             break;
         case AL5.Events.EVENT_JOYSTICK_BUTTON_UP:
             if (OnJoystickButtonUp != null)
                 OnJoystickButtonUp(ref evt.joystick);
             break;
         case AL5.Events.EVENT_JOYSTICK_CONFIGURATION:
             if (OnJoystickConfiguration != null)
                 OnJoystickConfiguration(ref evt.joystick);
             break;
         case AL5.Events.EVENT_KEY_DOWN:
             if (OnKeyDown != null)
                 OnKeyDown(ref evt.keyboard);
             break;
         case AL5.Events.EVENT_KEY_CHAR:
             if (OnKeyChar != null)
                 OnKeyChar(ref evt.keyboard);
             break;
         case AL5.Events.EVENT_KEY_UP:
             if (OnKeyUp != null)
                 OnKeyUp(ref evt.keyboard);
             break;
         case AL5.Events.EVENT_MOUSE_AXES:
             if (OnMouseAxes != null)
                 OnMouseAxes(ref evt.mouse);
             break;
         case AL5.Events.EVENT_MOUSE_BUTTON_DOWN:
             if (OnMouseButtonDown != null)
                 OnMouseButtonDown(ref evt.mouse);
             break;
         case AL5.Events.EVENT_MOUSE_BUTTON_UP:
             if (OnMouseButtonUp != null)
                 OnMouseButtonUp(ref evt.mouse);
             break;
         case AL5.Events.EVENT_MOUSE_ENTER_DISPLAY:
             if (OnMouseEnterDisplay != null)
                 OnMouseEnterDisplay(ref evt.mouse);
             break;
         case AL5.Events.EVENT_MOUSE_LEAVE_DISPLAY:
             if (OnMouseLeaveDisplay != null)
                 OnMouseLeaveDisplay(ref evt.mouse);
             break;
         case AL5.Events.EVENT_MOUSE_WARPED:
             if (OnMouseWarped != null)
                 OnMouseWarped(ref evt.mouse);
             break;
         case AL5.Events.EVENT_TIMER:
             if (OnTimer != null)
                 OnTimer(ref evt.timer);
             break;
         case AL5.Events.EVENT_DISPLAY_EXPOSE:
             if (OnDisplayExpose != null)
                 OnDisplayExpose(ref evt.display);
             break;
         case AL5.Events.EVENT_DISPLAY_RESIZE:
             if (OnDisplayResize != null)
                 OnDisplayResize(ref evt.display);
             break;
         case AL5.Events.EVENT_DISPLAY_CLOSE:
             if (OnDisplayClose != null)
                 OnDisplayClose(ref evt.display);
             break;
         case AL5.Events.EVENT_DISPLAY_LOST:
             if (OnDisplayLost != null)
                 OnDisplayLost(ref evt.display);
             break;
         case AL5.Events.EVENT_DISPLAY_FOUND:
             if (OnDisplayFound != null)
                 OnDisplayFound(ref evt.display);
             break;
         case AL5.Events.EVENT_DISPLAY_SWITCH_IN:
             if (OnDisplaySwitchIn != null)
                 OnDisplaySwitchIn(ref evt.display);
             break;
         case AL5.Events.EVENT_DISPLAY_SWITCH_OUT:
             if (OnDisplaySwitchOut != null)
                 OnDisplaySwitchOut(ref evt.display);
             break;
         case AL5.Events.EVENT_DISPLAY_ORIENTATION:
             if (OnDisplayOrientation != null)
                 OnDisplayOrientation(ref evt.display);
             break;
         default: throw new NotImplementedException();
     }
 }
Ejemplo n.º 3
0
 public void WaitForRawEvent(ref AL5.Events.ALEvent evt)
 {
     AL5.Events.al_wait_for_event(mHandle, ref evt);
 }