mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-10-14 00:23:57 +00:00
35c86ad6bf
Result of running IWYU (https://include-what-you-use.org/) and applying most of the suggestions about unncessary includes and forward declarations. Was motivated by observing that <thread> was being included in ppcopcodes.cpp even though it was unused (found while researching the use of threads), but seems generally good to help with build times and correctness.
58 lines
1.6 KiB
C++
58 lines
1.6 KiB
C++
/*
|
|
DingusPPC - The Experimental PowerPC Macintosh emulator
|
|
Copyright (C) 2018-23 divingkatae and maximum
|
|
(theweirdo) spatium
|
|
|
|
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
/** @file Apple Desktop Bus Mouse definitions. */
|
|
|
|
#ifndef ADB_MOUSE_H
|
|
#define ADB_MOUSE_H
|
|
|
|
#include <devices/common/adb/adbdevice.h>
|
|
#include <devices/common/hwcomponent.h>
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
class MouseEvent;
|
|
|
|
class AdbMouse : public AdbDevice {
|
|
public:
|
|
AdbMouse(std::string name);
|
|
~AdbMouse() = default;
|
|
|
|
static std::unique_ptr<HWComponent> create() {
|
|
return std::unique_ptr<AdbMouse>(new AdbMouse("ADB-MOUSE"));
|
|
}
|
|
|
|
void reset() override;
|
|
void event_handler(const MouseEvent& event);
|
|
|
|
bool get_register_0() override;
|
|
void set_register_3() override;
|
|
|
|
private:
|
|
int32_t x_rel = 0;
|
|
int32_t y_rel = 0;
|
|
uint8_t buttons_state = 0;
|
|
bool changed = false;
|
|
};
|
|
|
|
#endif // ADB_MOUSE_H
|