kodi
IMouseInputHandler.h
1 /*
2  * Copyright (C) 2016-2024 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "input/mouse/MouseTypes.h"
12 
13 #include <string>
14 
15 namespace KODI
16 {
17 namespace MOUSE
18 {
25 {
26 public:
27  virtual ~IMouseInputHandler(void) = default;
28 
34  virtual std::string ControllerID(void) const = 0;
35 
48  virtual bool OnMotion(const PointerName& relpointer, int dx, int dy) = 0;
49 
57  virtual bool OnButtonPress(const ButtonName& button) = 0;
58 
64  virtual void OnButtonRelease(const ButtonName& button) = 0;
65 
72  virtual void OnInputFrame() = 0;
73 };
74 } // namespace MOUSE
75 } // namespace KODI
std::string ButtonName
Name of a mouse button.
Definition: MouseTypes.h:45
virtual std::string ControllerID(void) const =0
The controller profile for this mouse input handler.
Definition: AudioDecoder.h:18
virtual void OnInputFrame()=0
Called at the end of the frame that provided input.
std::string PointerName
Name of the mouse pointer.
Definition: MouseTypes.h:57
Interface for handling mouse events.
Definition: IMouseInputHandler.h:24
virtual bool OnMotion(const PointerName &relpointer, int dx, int dy)=0
A relative pointer has moved.
virtual bool OnButtonPress(const ButtonName &button)=0
A mouse button has been pressed.
virtual void OnButtonRelease(const ButtonName &button)=0
A mouse button has been released.