mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-20 01:53:34 -04:00
@@ -13,6 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_H
|
||||
#define DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_H
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
@@ -35,4 +38,5 @@ private:
|
||||
};
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
} // namespace OHOS
|
||||
#endif // DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_H
|
||||
@@ -13,6 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_MGR_H
|
||||
#define DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_MGR_H
|
||||
|
||||
#include "touchpad_event_fragment.h"
|
||||
|
||||
#include <map>
|
||||
@@ -54,4 +57,5 @@ private:
|
||||
};
|
||||
} // namespace DistributedInput
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
} // namespace OHOS
|
||||
#endif // DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_MGR_H
|
||||
@@ -149,7 +149,8 @@ void DInputSinkState::SimulateKeyDownEvents(const int32_t sessionId, const std::
|
||||
keyDownStateMap_.erase(dhId);
|
||||
}
|
||||
|
||||
void DInputSinkState::SimulateKeyDownEvent(const int32_t sessionId, const std::string &dhId, const struct RawEvent &event)
|
||||
void DInputSinkState::SimulateKeyDownEvent(const int32_t sessionId, const std::string &dhId,
|
||||
const struct RawEvent &event)
|
||||
{
|
||||
DistributedInputSinkTransport::GetInstance().SendKeyStateNodeMsg(sessionId, dhId,
|
||||
EV_KEY, event.code, KEY_DOWN_STATE);
|
||||
|
||||
@@ -42,7 +42,8 @@ bool TouchPadEventFragmentMgr::IsWholeTouchFragments(const std::vector<TouchPadE
|
||||
return events.front().IsTouchPadOptStart() && events.back().IsTouchPadOptFinish();
|
||||
}
|
||||
|
||||
std::pair<bool, std::vector<RawEvent>> TouchPadEventFragmentMgr::PushEvent(const std::string &dhId, const RawEvent &event)
|
||||
std::pair<bool, std::vector<RawEvent>> TouchPadEventFragmentMgr::PushEvent(const std::string &dhId,
|
||||
const RawEvent &event)
|
||||
{
|
||||
if (IsPositionEvent(event)) {
|
||||
return {false, {}};
|
||||
|
||||
Reference in New Issue
Block a user