Skip to content

Commit

Permalink
Add mouse_basic
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Sep 19, 2023
1 parent 3ce8492 commit 124f0b0
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/share/manipulator/manipulator_factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "core_configuration/core_configuration.hpp"
#include "manipulator/manipulators/base.hpp"
#include "manipulator/manipulators/basic/basic.hpp"
#include "manipulator/manipulators/mouse_basic/mouse_basic.hpp"
#include "manipulator/manipulators/mouse_motion_to_scroll/mouse_motion_to_scroll.hpp"
#include "manipulator/manipulators/nop.hpp"
#include "manipulator/types.hpp"
Expand Down
51 changes: 51 additions & 0 deletions src/share/manipulator/manipulators/mouse_basic/mouse_basic.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#pragma once

#include "../../types.hpp"
#include "../base.hpp"

namespace krbn {
namespace manipulator {
namespace manipulators {
class mouse_basic final : public base {
public:
mouse_basic(void) : base() {
}

virtual ~mouse_basic(void) {
}

virtual bool already_manipulated(const event_queue::entry& front_input_event) {
return false;
}

virtual manipulate_result manipulate(event_queue::entry& front_input_event,
const event_queue::queue& input_event_queue,
std::shared_ptr<event_queue::queue> output_event_queue,
absolute_time_point now) {
return manipulate_result::passed;
}

virtual bool active(void) const {
return false;
}

virtual bool needs_virtual_hid_pointing(void) const {
return true;
}

virtual void handle_device_keys_and_pointing_buttons_are_released_event(const event_queue::entry& front_input_event,
event_queue::queue& output_event_queue) {
}

virtual void handle_device_ungrabbed_event(device_id device_id,
const event_queue::queue& output_event_queue,
absolute_time_point time_stamp) {
}

virtual void handle_pointing_device_event_from_event_tap(const event_queue::entry& front_input_event,
event_queue::queue& output_event_queue) {
}
};
} // namespace manipulators
} // namespace manipulator
} // namespace krbn

0 comments on commit 124f0b0

Please sign in to comment.