Lines Matching refs:int32_t

37         int32_t keyCode;
43 int32_t sensorDataIndex;
52 KeyedVector<int32_t, int32_t> keyCodeStates;
53 KeyedVector<int32_t, int32_t> scanCodeStates;
54 KeyedVector<int32_t, int32_t> switchStates;
55 KeyedVector<int32_t, int32_t> absoluteAxisValue;
56 KeyedVector<int32_t, KeyInfo> keysByScanCode;
57 KeyedVector<int32_t, KeyInfo> keysByUsageCode;
58 std::unordered_map<int32_t, int32_t> keyRemapping;
59 KeyedVector<int32_t, bool> leds;
61 std::unordered_map<int32_t, int32_t> keyCodeMapping;
62 std::unordered_map<int32_t, SensorInfo> sensorsByAbsCode;
68 std::unordered_map<int32_t, std::vector<int32_t>> mtSlotValues;
86 KeyedVector<int32_t, Device*> mDevices;
89 std::unordered_map<int32_t /*deviceId*/, std::vector<TouchVideoFrame>> mVideoFrames;
90 std::vector<int32_t> mVibrators = {0, 1};
91 std::unordered_map<int32_t, RawLightInfo> mRawLightInfos;
93 std::unordered_map<int32_t /* lightId */, int32_t /* brightness*/> mLightBrightness;
95 std::unordered_map<int32_t /* lightId */, std::unordered_map<LightColor, int32_t>>
99 static constexpr int32_t DEFAULT_BATTERY = 1;
100 static constexpr int32_t BATTERY_STATUS = 4;
101 static constexpr int32_t BATTERY_CAPACITY = 66;
107 void addDevice(int32_t deviceId, const std::string& name, ftl::Flags<InputDeviceClass> classes,
109 void removeDevice(int32_t deviceId);
111 bool isDeviceEnabled(int32_t deviceId) const override;
112 status_t enableDevice(int32_t deviceId) override;
113 status_t disableDevice(int32_t deviceId) override;
117 void addConfigurationProperty(int32_t deviceId, const char* key, const char* value);
118 void addConfigurationMap(int32_t deviceId, const PropertyMap* configuration);
120 void addAbsoluteAxis(int32_t deviceId, int axis, int32_t minValue, int32_t maxValue, int flat,
122 void addRelativeAxis(int32_t deviceId, int32_t axis);
123 void setAbsoluteAxisValue(int32_t deviceId, int32_t axis, int32_t value);
125 void setRawLayoutInfo(int32_t deviceId, RawLayoutInfo info);
127 void setKeyCodeState(int32_t deviceId, int32_t keyCode, int32_t state);
128 void setScanCodeState(int32_t deviceId, int32_t scanCode, int32_t state);
129 void setSwitchState(int32_t deviceId, int32_t switchCode, int32_t state);
131 void addKey(int32_t deviceId, int32_t scanCode, int32_t usageCode, int32_t keyCode,
133 void addKeyCodeMapping(int32_t deviceId, int32_t fromKeyCode, int32_t toKeyCode);
134 void addKeyRemapping(int32_t deviceId, int32_t fromKeyCode, int32_t toKeyCode) const;
135 void addVirtualKeyDefinition(int32_t deviceId, const VirtualKeyDefinition& definition);
137 void addSensorAxis(int32_t deviceId, int32_t absCode, InputDeviceSensorType sensorType,
138 int32_t sensorDataIndex);
140 void setMscEvent(int32_t deviceId, int32_t mscEvent);
142 void addLed(int32_t deviceId, int32_t led, bool initialState);
143 void addRawLightInfo(int32_t rawId, RawLightInfo&& info);
144 void fakeLightBrightness(int32_t rawId, int32_t brightness);
145 void fakeLightIntensities(int32_t rawId,
146 const std::unordered_map<LightColor, int32_t> intensities);
147 bool getLedState(int32_t deviceId, int32_t led);
152 std::unordered_map<int32_t /*deviceId*/, std::vector<TouchVideoFrame>> videoFrames);
154 void enqueueEvent(nsecs_t when, nsecs_t readTime, int32_t deviceId, int32_t type, int32_t code,
155 int32_t value);
157 void setSysfsRootPath(int32_t deviceId, std::string sysfsRootPath) const;
160 void setMtSlotValues(int32_t deviceId, int32_t axis, const std::vector<int32_t>& values);
161 base::Result<std::vector<int32_t>> getMtSlotValues(int32_t deviceId, int32_t axis,
165 Device* getDevice(int32_t deviceId) const;
167 ftl::Flags<InputDeviceClass> getDeviceClasses(int32_t deviceId) const override;
168 InputDeviceIdentifier getDeviceIdentifier(int32_t deviceId) const override;
169 int32_t getDeviceControllerNumber(int32_t) const override;
170 std::optional<PropertyMap> getConfiguration(int32_t deviceId) const override;
171 status_t getAbsoluteAxisInfo(int32_t deviceId, int axis,
173 bool hasRelativeAxis(int32_t deviceId, int axis) const override;
174 bool hasInputProperty(int32_t, int) const override;
175 bool hasMscEvent(int32_t deviceId, int mscEvent) const override final;
176 status_t mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode, int32_t metaState,
177 int32_t* outKeycode, int32_t* outMetaState, uint32_t* outFlags) const override;
178 const KeyInfo* getKey(Device* device, int32_t scanCode, int32_t usageCode) const;
180 status_t mapAxis(int32_t, int32_t, AxisInfo*) const override;
181 base::Result<std::pair<InputDeviceSensorType, int32_t>> mapSensor(
182 int32_t deviceId, int32_t absCode) const override;
185 std::vector<TouchVideoFrame> getVideoFrames(int32_t deviceId) override;
186 int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const override;
187 std::optional<RawLayoutInfo> getRawLayoutInfo(int32_t deviceId) const override;
188 int32_t getKeyCodeState(int32_t deviceId, int32_t keyCode) const override;
189 int32_t getSwitchState(int32_t deviceId, int32_t sw) const override;
190 status_t getAbsoluteAxisValue(int32_t deviceId, int32_t axis, int32_t* outValue) const override;
191 int32_t getKeyCodeForKeyLocation(int32_t deviceId, int32_t locationKeyCode) const override;
194 bool markSupportedKeyCodes(int32_t deviceId, const std::vector<int32_t>& keyCodes,
196 bool hasScanCode(int32_t deviceId, int32_t scanCode) const override;
197 bool hasKeyCode(int32_t deviceId, int32_t keyCode) const override;
198 bool hasLed(int32_t deviceId, int32_t led) const override;
199 void setLedState(int32_t deviceId, int32_t led, bool on) override;
200 void getVirtualKeyDefinitions(int32_t deviceId,
202 const std::shared_ptr<KeyCharacterMap> getKeyCharacterMap(int32_t) const override;
203 bool setKeyboardLayoutOverlay(int32_t, std::shared_ptr<KeyCharacterMap>) override;
205 void vibrate(int32_t, const VibrationElement&) override {} in vibrate() argument
206 void cancelVibrate(int32_t) override {} in cancelVibrate() argument
207 std::vector<int32_t> getVibratorIds(int32_t deviceId) const override;
209 std::optional<int32_t> getBatteryCapacity(int32_t, int32_t) const override;
210 std::optional<int32_t> getBatteryStatus(int32_t, int32_t) const override;
211 std::vector<int32_t> getRawBatteryIds(int32_t deviceId) const override;
212 std::optional<RawBatteryInfo> getRawBatteryInfo(int32_t deviceId,
213 int32_t batteryId) const override;
215 std::vector<int32_t> getRawLightIds(int32_t deviceId) const override;
216 std::optional<RawLightInfo> getRawLightInfo(int32_t deviceId, int32_t lightId) const override;
217 void setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) override;
218 void setLightIntensities(int32_t deviceId, int32_t lightId,
219 std::unordered_map<LightColor, int32_t> intensities) override;
220 std::optional<int32_t> getLightBrightness(int32_t deviceId, int32_t lightId) const override;
221 std::optional<std::unordered_map<LightColor, int32_t>> getLightIntensities(
222 int32_t deviceId, int32_t lightId) const override;