2
* Copyright (C) 2012 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Thomas Voss <thomas.voss@canonical.com>
19
#ifndef INPUT_STACK_COMPATIBILITY_LAYER_H_
20
#define INPUT_STACK_COMPATIBILITY_LAYER_H_
28
static const size_t MAX_POINTER_COUNT = 16;
30
typedef int64_t nsecs_t;
41
// Generic event properties
48
// Information specific to key/motion event types
51
struct HardwareSwitchEvent
54
uint32_t policy_flags;
55
int32_t switch_values;
79
struct PointerCoordinates
90
PointerCoordinates pointer_coordinates[MAX_POINTER_COUNT];
95
struct AndroidEventListener
97
typedef void (*on_new_event_callback)(Event* event, void* context);
99
on_new_event_callback on_new_event;
103
struct InputStackConfiguration
105
bool enable_touch_point_visualization;
106
int default_layer_for_touch_point_visualization;
109
void android_input_stack_initialize(
110
AndroidEventListener* listener,
111
InputStackConfiguration* input_stack_configuration);
113
void android_input_stack_loop_once();
114
void android_input_stack_start();
115
void android_input_stack_start_waiting_for_flag(bool* flag);
116
void android_input_stack_stop();
117
void android_input_stack_shutdown();
123
#endif // INPUT_STACK_COMPATIBILITY_LAYER_H_