blob: 8ca47f8c6250cb9ff0e797daac302a5f511229d5 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
namespace exo {
// Handles events for a specific gamepad.
class GamepadDelegate {
// Called when the gamepad has been removed.
virtual void OnRemoved() = 0;
// Called when the user moved an axis of the gamepad.
virtual void OnAxis(int axis, double value) = 0;
// Called when the user pressed or moved a button of the gamepad.
virtual void OnButton(int button, bool pressed) = 0;
// Called after all gamepad information of this frame has been set and the
// client should evaluate the updated state.
virtual void OnFrame() = 0;
virtual ~GamepadDelegate() {}
} // namespace exo