blob: b852561c196731b9976fb8e8325dda107916130d [file] [log] [blame]
/*
* Copyright (C) 2019 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef VENDOR_LINEAGE_TOUCH_V1_0_TOUCHSCREENGESTURE_H
#define VENDOR_LINEAGE_TOUCH_V1_0_TOUCHSCREENGESTURE_H
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/touch/1.0/ITouchscreenGesture.h>
#include <map>
namespace vendor {
namespace lineage {
namespace touch {
namespace V1_0 {
namespace implementation {
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::sp;
class TouchscreenGesture : public ITouchscreenGesture {
public:
// Methods from ::vendor::lineage::touch::V1_0::ITouchscreenGesture follow.
Return<void> getSupportedGestures(getSupportedGestures_cb resultCb) override;
Return<bool> setGestureEnabled(const ::vendor::lineage::touch::V1_0::Gesture& gesture,
bool enabled) override;
private:
typedef struct {
int32_t keycode;
const char* name;
const char* path;
} GestureInfo;
static const std::map<int32_t, GestureInfo> kGestureInfoMap; // id -> info
};
} // namespace implementation
} // namespace V1_0
} // namespace touch
} // namespace lineage
} // namespace vendor
#endif // VENDOR_LINEAGE_TOUCH_V1_0_TOUCHSCREENGESTURE_H