summaryrefslogtreecommitdiffstats
path: root/include/input
diff options
context:
space:
mode:
Diffstat (limited to 'include/input')
-rw-r--r--include/input/IInputFlinger.h52
-rw-r--r--include/input/Input.h12
-rw-r--r--include/input/InputDevice.h5
-rw-r--r--include/input/InputEventLabels.h5
4 files changed, 73 insertions, 1 deletions
diff --git a/include/input/IInputFlinger.h b/include/input/IInputFlinger.h
new file mode 100644
index 0000000..629310f
--- /dev/null
+++ b/include/input/IInputFlinger.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2013 The Android Open Source 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.
+ */
+
+#ifndef _LIBINPUT_IINPUT_FLINGER_H
+#define _LIBINPUT_IINPUT_FLINGER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <binder/IInterface.h>
+
+namespace android {
+
+/*
+ * This class defines the Binder IPC interface for accessing various
+ * InputFlinger features.
+ */
+class IInputFlinger : public IInterface {
+public:
+ DECLARE_META_INTERFACE(InputFlinger);
+};
+
+
+/**
+ * Binder implementation.
+ */
+class BnInputFlinger : public BnInterface<IInputFlinger> {
+public:
+ enum {
+ DO_SOMETHING_TRANSACTION = IBinder::FIRST_CALL_TRANSACTION,
+ };
+
+ virtual status_t onTransact(uint32_t code, const Parcel& data,
+ Parcel* reply, uint32_t flags = 0);
+};
+
+} // namespace android
+
+#endif // _LIBINPUT_IINPUT_FLINGER_H
diff --git a/include/input/Input.h b/include/input/Input.h
index 96b6885..c360f63 100644
--- a/include/input/Input.h
+++ b/include/input/Input.h
@@ -149,10 +149,22 @@ enum {
* NOTE: If you want a flag to be able to set in a keylayout file, then you must add it to
* InputEventLabels.h as well. */
+ // Indicates that the event should wake the device.
POLICY_FLAG_WAKE = 0x00000001,
+
+ // Indicates that the key is virtual, such as a capacitive button, and should
+ // generate haptic feedback. Virtual keys may be suppressed for some time
+ // after a recent touch to prevent accidental activation of virtual keys adjacent
+ // to the touch screen during an edge swipe.
POLICY_FLAG_VIRTUAL = 0x00000002,
+
+ // Indicates that the key is the special function modifier.
POLICY_FLAG_FUNCTION = 0x00000004,
+ // Indicates that the key represents a special gesture that has been detected by
+ // the touch firmware or driver. Causes touch events from the same device to be canceled.
+ POLICY_FLAG_GESTURE = 0x00000008,
+
POLICY_FLAG_RAW_MASK = 0x0000ffff,
/* These flags are set by the input dispatcher. */
diff --git a/include/input/InputDevice.h b/include/input/InputDevice.h
index adf9fb9..1ea69d3 100644
--- a/include/input/InputDevice.h
+++ b/include/input/InputDevice.h
@@ -73,7 +73,8 @@ public:
};
void initialize(int32_t id, int32_t generation, int32_t controllerNumber,
- const InputDeviceIdentifier& identifier, const String8& alias, bool isExternal);
+ const InputDeviceIdentifier& identifier, const String8& alias, bool isExternal,
+ bool hasMic);
inline int32_t getId() const { return mId; }
inline int32_t getControllerNumber() const { return mControllerNumber; }
@@ -84,6 +85,7 @@ public:
return mAlias.isEmpty() ? mIdentifier.name : mAlias;
}
inline bool isExternal() const { return mIsExternal; }
+ inline bool hasMic() const { return mHasMic; }
inline uint32_t getSources() const { return mSources; }
const MotionRange* getMotionRange(int32_t axis, uint32_t source) const;
@@ -121,6 +123,7 @@ private:
InputDeviceIdentifier mIdentifier;
String8 mAlias;
bool mIsExternal;
+ bool mHasMic;
uint32_t mSources;
int32_t mKeyboardType;
sp<KeyCharacterMap> mKeyCharacterMap;
diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h
index df50237..3962001 100644
--- a/include/input/InputEventLabels.h
+++ b/include/input/InputEventLabels.h
@@ -299,6 +299,10 @@ static const InputEventLabel KEYCODES[] = {
DEFINE_KEYCODE(TV_MEDIA_CONTEXT_MENU),
DEFINE_KEYCODE(TV_TIMER_PROGRAMMING),
DEFINE_KEYCODE(HELP),
+ DEFINE_KEYCODE(NAVIGATE_PREVIOUS),
+ DEFINE_KEYCODE(NAVIGATE_NEXT),
+ DEFINE_KEYCODE(NAVIGATE_IN),
+ DEFINE_KEYCODE(NAVIGATE_OUT),
{ NULL, 0 }
};
@@ -376,6 +380,7 @@ static const InputEventLabel LEDS[] = {
static const InputEventLabel FLAGS[] = {
DEFINE_FLAG(VIRTUAL),
DEFINE_FLAG(FUNCTION),
+ DEFINE_FLAG(GESTURE),
{ NULL, 0 }
};