interfaces: Add touch HIDL interface definitions
Change-Id: I136a6d911bff1300ca61cd2bde06163c2f6c4edd
diff --git a/touch/1.0/Android.bp b/touch/1.0/Android.bp
new file mode 100644
index 0000000..8b1fd27
--- /dev/null
+++ b/touch/1.0/Android.bp
@@ -0,0 +1,21 @@
+// This file is autogenerated by hidl-gen -Landroidbp.
+
+hidl_interface {
+ name: "vendor.lineage.touch@1.0",
+ root: "vendor.lineage",
+ srcs: [
+ "types.hal",
+ "IGloveMode.hal",
+ "IKeyDisabler.hal",
+ "IStylusMode.hal",
+ "ITouchscreenGesture.hal",
+ ],
+ interfaces: [
+ "android.hidl.base@1.0",
+ ],
+ types: [
+ "Gesture",
+ ],
+ gen_java: true,
+}
+
diff --git a/touch/1.0/IGloveMode.hal b/touch/1.0/IGloveMode.hal
new file mode 100644
index 0000000..340e629
--- /dev/null
+++ b/touch/1.0/IGloveMode.hal
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2018-2019 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.lineage.touch@1.0;
+
+interface IGloveMode {
+ isEnabled() generates (bool rc);
+ setEnabled(bool enabled) generates (bool rc);
+};
diff --git a/touch/1.0/IKeyDisabler.hal b/touch/1.0/IKeyDisabler.hal
new file mode 100644
index 0000000..db7d12c
--- /dev/null
+++ b/touch/1.0/IKeyDisabler.hal
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2018-2019 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.lineage.touch@1.0;
+
+interface IKeyDisabler {
+ isEnabled() generates (bool rc);
+ setEnabled(bool enabled) generates (bool rc);
+};
diff --git a/touch/1.0/IStylusMode.hal b/touch/1.0/IStylusMode.hal
new file mode 100644
index 0000000..ca4bc6c
--- /dev/null
+++ b/touch/1.0/IStylusMode.hal
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2018-2019 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.lineage.touch@1.0;
+
+interface IStylusMode {
+ isEnabled() generates (bool rc);
+ setEnabled(bool enabled) generates (bool rc);
+};
diff --git a/touch/1.0/ITouchscreenGesture.hal b/touch/1.0/ITouchscreenGesture.hal
new file mode 100644
index 0000000..a3fdcab
--- /dev/null
+++ b/touch/1.0/ITouchscreenGesture.hal
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2018-2019 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.lineage.touch@1.0;
+
+interface ITouchscreenGesture {
+ getSupportedGestures() generates (vec<Gesture> gestures);
+ setGestureEnabled(Gesture gesture, bool enabled) generates (bool rc);
+};
diff --git a/touch/1.0/types.hal b/touch/1.0/types.hal
new file mode 100644
index 0000000..c901667
--- /dev/null
+++ b/touch/1.0/types.hal
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2018-2019 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.lineage.touch@1.0;
+
+struct Gesture {
+ int32_t id;
+ string name;
+ int32_t keycode;
+};