//1// Copyright 2014 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//56#ifndef SAMPLE_UTIL_EVENT_H7#define SAMPLE_UTIL_EVENT_H89#include "keyboard.h"10#include "mouse.h"1112class Event13{14public:15struct MoveEvent16{17int X;18int Y;19};2021struct SizeEvent22{23int Width;24int Height;25};2627struct KeyEvent28{29Key Code;30bool Alt;31bool Control;32bool Shift;33bool System;34};3536struct MouseMoveEvent37{38int X;39int Y;40};4142struct MouseButtonEvent43{44MouseButton Button;45int X;46int Y;47};4849struct MouseWheelEvent50{51int Delta;52};5354enum EventType55{56EVENT_CLOSED, // The window requested to be closed57EVENT_MOVED, // The window has moved58EVENT_RESIZED, // The window was resized59EVENT_LOST_FOCUS, // The window lost the focus60EVENT_GAINED_FOCUS, // The window gained the focus61EVENT_TEXT_ENTERED, // A character was entered62EVENT_KEY_PRESSED, // A key was pressed63EVENT_KEY_RELEASED, // A key was released64EVENT_MOUSE_WHEEL_MOVED, // The mouse wheel was scrolled65EVENT_MOUSE_BUTTON_PRESSED, // A mouse button was pressed66EVENT_MOUSE_BUTTON_RELEASED, // A mouse button was released67EVENT_MOUSE_MOVED, // The mouse cursor moved68EVENT_MOUSE_ENTERED, // The mouse cursor entered the area of the window69EVENT_MOUSE_LEFT, // The mouse cursor left the area of the window70EVENT_TEST, // Event for testing purposes71};7273EventType Type;7475union76{77MoveEvent Move; // Move event parameters78SizeEvent Size; // Size event parameters79KeyEvent Key; // Key event parameters80MouseMoveEvent MouseMove; // Mouse move event parameters81MouseButtonEvent MouseButton; // Mouse button event parameters82MouseWheelEvent MouseWheel; // Mouse wheel event parameters83};84};8586#endif // SAMPLE_UTIL_EVENT_H878889