1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/features.gni")
6 import("//build/config/linux/pkg_config.gni")
7 import("//build/config/ui.gni")
10 # Optional system libraries.
15 pkg_config("xkbcommon") {
16 packages = [ "xkbcommon" ]
20 component("events_ozone") {
22 "chromeos/cursor_controller.cc",
23 "chromeos/cursor_controller.h",
24 "device/device_event.cc",
25 "device/device_event.h",
26 "device/device_event_observer.h",
27 "device/device_manager.cc",
28 "device/device_manager.h",
29 "device/device_manager_manual.cc",
30 "device/device_manager_manual.h",
31 "device/udev/device_manager_udev.cc",
32 "device/udev/device_manager_udev.h",
33 "events_ozone_export.h",
38 "//base/third_party/dynamic_annotations",
40 "//ui/events:events_base",
43 defines = [ "EVENTS_OZONE_IMPLEMENTATION" ]
47 "device/udev/device_manager_udev.cc",
48 "device/udev/device_manager_udev.h",
52 if (use_ozone_evdev && use_udev) {
53 deps += [ "//device/udev_linux" ]
58 defines = [ "USE_EVDEV" ]
61 config("evdev_gestures") {
62 defines = [ "USE_EVDEV_GESTURES" ]
65 component("events_ozone_evdev") {
67 "evdev/device_event_dispatcher_evdev.cc",
68 "evdev/device_event_dispatcher_evdev.h",
69 "evdev/event_converter_evdev.cc",
70 "evdev/event_converter_evdev.h",
71 "evdev/event_converter_evdev_impl.cc",
72 "evdev/event_converter_evdev_impl.h",
73 "evdev/event_device_info.cc",
74 "evdev/event_device_info.h",
75 "evdev/event_factory_evdev.cc",
76 "evdev/event_factory_evdev.h",
77 "evdev/event_modifiers_evdev.cc",
78 "evdev/event_modifiers_evdev.h",
79 "evdev/event_thread_evdev.cc",
80 "evdev/event_thread_evdev.h",
81 "evdev/events_ozone_evdev_export.h",
82 "evdev/input_controller_evdev.cc",
83 "evdev/input_controller_evdev.h",
84 "evdev/input_device_factory_evdev.cc",
85 "evdev/input_device_factory_evdev.h",
86 "evdev/input_device_factory_evdev_proxy.cc",
87 "evdev/input_device_factory_evdev_proxy.h",
88 "evdev/input_device_settings_evdev.cc",
89 "evdev/input_device_settings_evdev.h",
90 "evdev/input_injector_evdev.cc",
91 "evdev/input_injector_evdev.h",
92 "evdev/keyboard_evdev.cc",
93 "evdev/keyboard_evdev.h",
94 "evdev/keyboard_util_evdev.cc",
95 "evdev/keyboard_util_evdev.h",
96 "evdev/mouse_button_map_evdev.cc",
97 "evdev/mouse_button_map_evdev.h",
98 "evdev/tablet_event_converter_evdev.cc",
99 "evdev/tablet_event_converter_evdev.h",
100 "evdev/touch_event_converter_evdev.cc",
101 "evdev/touch_event_converter_evdev.h",
104 defines = [ "EVENTS_OZONE_EVDEV_IMPLEMENTATION" ]
108 ":events_ozone_layout",
111 "//ui/events:dom4_keycode_converter",
112 "//ui/events:events_base",
113 "//ui/events/devices",
114 "//ui/events/platform",
118 public_configs = [ ":evdev" ]
120 if (use_ozone_evdev && use_evdev_gestures) {
122 "evdev/libgestures_glue/event_reader_libevdev_cros.cc",
123 "evdev/libgestures_glue/event_reader_libevdev_cros.h",
124 "evdev/libgestures_glue/gesture_feedback.cc",
125 "evdev/libgestures_glue/gesture_feedback.h",
126 "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc",
127 "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h",
128 "evdev/libgestures_glue/gesture_logging.cc",
129 "evdev/libgestures_glue/gesture_logging.h",
130 "evdev/libgestures_glue/gesture_property_provider.cc",
131 "evdev/libgestures_glue/gesture_property_provider.h",
132 "evdev/libgestures_glue/gesture_timer_provider.cc",
133 "evdev/libgestures_glue/gesture_timer_provider.h",
136 public_configs += [ ":evdev_gestures" ]
139 "//build/config/linux:libevdev-cros",
140 "//build/config/linux:libgestures",
145 config("events_ozone_layout_config") {
147 defines = [ "USE_XKBCOMMON" ]
151 component("events_ozone_layout") {
153 "layout/events_ozone_layout_export.h",
154 "layout/keyboard_layout_engine.h",
155 "layout/keyboard_layout_engine_manager.cc",
156 "layout/keyboard_layout_engine_manager.h",
157 "layout/layout_util.cc",
158 "layout/layout_util.h",
159 "layout/no/no_keyboard_layout_engine.cc",
160 "layout/no/no_keyboard_layout_engine.h",
161 "layout/stub/stub_keyboard_layout_engine.cc",
162 "layout/stub/stub_keyboard_layout_engine.h",
165 defines = [ "EVENTS_OZONE_LAYOUT_IMPLEMENTATION" ]
169 "//ui/events:dom4_keycode_converter",
170 "//ui/events:events_base",
173 public_configs = [ ":events_ozone_layout_config" ]
176 configs += [ ":xkbcommon" ]
179 "layout/xkb/scoped_xkb.h",
181 "layout/xkb/xkb_evdev_codes.cc",
182 "layout/xkb/xkb_evdev_codes.h",
183 "layout/xkb/xkb_key_code_converter.h",
184 "layout/xkb/xkb_keyboard_code_conversion.cc",
185 "layout/xkb/xkb_keyboard_code_conversion.h",
186 "layout/xkb/xkb_keyboard_layout_engine.cc",
187 "layout/xkb/xkb_keyboard_layout_engine.h",
188 "layout/xkb/xkb_keysym.h",