1a46c0ec8Sopenharmony_ci/*
2a46c0ec8Sopenharmony_ci * Copyright © 2008 Kristian Høgsberg
3a46c0ec8Sopenharmony_ci * Copyright © 2013-2015 Red Hat, Inc.
4a46c0ec8Sopenharmony_ci *
5a46c0ec8Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
6a46c0ec8Sopenharmony_ci * copy of this software and associated documentation files (the "Software"),
7a46c0ec8Sopenharmony_ci * to deal in the Software without restriction, including without limitation
8a46c0ec8Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9a46c0ec8Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the
10a46c0ec8Sopenharmony_ci * Software is furnished to do so, subject to the following conditions:
11a46c0ec8Sopenharmony_ci *
12a46c0ec8Sopenharmony_ci * The above copyright notice and this permission notice (including the next
13a46c0ec8Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the
14a46c0ec8Sopenharmony_ci * Software.
15a46c0ec8Sopenharmony_ci *
16a46c0ec8Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17a46c0ec8Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18a46c0ec8Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19a46c0ec8Sopenharmony_ci * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20a46c0ec8Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21a46c0ec8Sopenharmony_ci * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22a46c0ec8Sopenharmony_ci * DEALINGS IN THE SOFTWARE.
23a46c0ec8Sopenharmony_ci */
24a46c0ec8Sopenharmony_ci
25a46c0ec8Sopenharmony_ci#ifndef LIBINPUT_UTIL_H
26a46c0ec8Sopenharmony_ci#define LIBINPUT_UTIL_H
27a46c0ec8Sopenharmony_ci
28a46c0ec8Sopenharmony_ci#include "config.h"
29a46c0ec8Sopenharmony_ci
30a46c0ec8Sopenharmony_ci#ifdef NDEBUG
31a46c0ec8Sopenharmony_ci#warning "libinput relies on assert(). #defining NDEBUG is not recommended"
32a46c0ec8Sopenharmony_ci#endif
33a46c0ec8Sopenharmony_ci
34a46c0ec8Sopenharmony_ci#include "libinput.h"
35a46c0ec8Sopenharmony_ci
36a46c0ec8Sopenharmony_ci#include "util-bits.h"
37a46c0ec8Sopenharmony_ci#include "util-macros.h"
38a46c0ec8Sopenharmony_ci#include "util-list.h"
39a46c0ec8Sopenharmony_ci#include "util-matrix.h"
40a46c0ec8Sopenharmony_ci#include "util-strings.h"
41a46c0ec8Sopenharmony_ci#include "util-ratelimit.h"
42a46c0ec8Sopenharmony_ci#include "util-prop-parsers.h"
43a46c0ec8Sopenharmony_ci#include "util-time.h"
44a46c0ec8Sopenharmony_ci
45a46c0ec8Sopenharmony_ci#define VENDOR_ID_APPLE 0x5ac
46a46c0ec8Sopenharmony_ci#define VENDOR_ID_CHICONY 0x4f2
47a46c0ec8Sopenharmony_ci#define VENDOR_ID_LOGITECH 0x46d
48a46c0ec8Sopenharmony_ci#define VENDOR_ID_WACOM 0x56a
49a46c0ec8Sopenharmony_ci#define VENDOR_ID_SYNAPTICS_SERIAL 0x002
50a46c0ec8Sopenharmony_ci#define PRODUCT_ID_APPLE_KBD_TOUCHPAD 0x273
51a46c0ec8Sopenharmony_ci#define PRODUCT_ID_APPLE_APPLETOUCH 0x21a
52a46c0ec8Sopenharmony_ci#define PRODUCT_ID_SYNAPTICS_SERIAL 0x007
53a46c0ec8Sopenharmony_ci#define PRODUCT_ID_WACOM_EKR 0x0331
54a46c0ec8Sopenharmony_ci
55a46c0ec8Sopenharmony_ci/* The HW DPI rate we normalize to before calculating pointer acceleration */
56a46c0ec8Sopenharmony_ci#define DEFAULT_MOUSE_DPI 1000
57a46c0ec8Sopenharmony_ci#define DEFAULT_TRACKPOINT_SENSITIVITY 128
58a46c0ec8Sopenharmony_ci
59a46c0ec8Sopenharmony_ci#define trace(...) \
60a46c0ec8Sopenharmony_ci	do { \
61a46c0ec8Sopenharmony_ci	printf("%s() - \033[0;31m", __func__); \
62a46c0ec8Sopenharmony_ci	printf(__VA_ARGS__); \
63a46c0ec8Sopenharmony_ci	printf("\033[0m"); \
64a46c0ec8Sopenharmony_ci	} while (0)
65a46c0ec8Sopenharmony_ci
66a46c0ec8Sopenharmony_ci#define LIBINPUT_EXPORT __attribute__ ((visibility("default")))
67a46c0ec8Sopenharmony_ci#define LIBINPUT_UNUSED __attribute__ ((unused))
68a46c0ec8Sopenharmony_ci
69a46c0ec8Sopenharmony_ci#endif /* LIBINPUT_UTIL_H */
70