1a46c0ec8Sopenharmony_ci 2a46c0ec8Sopenharmony_ci/* 3a46c0ec8Sopenharmony_ci * Copyright © 2013 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#include "config.h" 26a46c0ec8Sopenharmony_ci 27a46c0ec8Sopenharmony_ci#include "litest.h" 28a46c0ec8Sopenharmony_ci#include "litest-int.h" 29a46c0ec8Sopenharmony_ci 30a46c0ec8Sopenharmony_cistatic struct input_id input_id = { 31a46c0ec8Sopenharmony_ci .bustype = 0x3, 32a46c0ec8Sopenharmony_ci .vendor = 0x0123, 33a46c0ec8Sopenharmony_ci .product = 0x0456, 34a46c0ec8Sopenharmony_ci}; 35a46c0ec8Sopenharmony_ci 36a46c0ec8Sopenharmony_cistatic int events[] = { 37a46c0ec8Sopenharmony_ci EV_KEY, BTN_LEFT, 38a46c0ec8Sopenharmony_ci EV_KEY, BTN_RIGHT, 39a46c0ec8Sopenharmony_ci EV_KEY, BTN_MIDDLE, 40a46c0ec8Sopenharmony_ci EV_REL, REL_X, 41a46c0ec8Sopenharmony_ci EV_REL, REL_Y, 42a46c0ec8Sopenharmony_ci EV_REL, REL_WHEEL, 43a46c0ec8Sopenharmony_ci EV_REL, REL_WHEEL_HI_RES, 44a46c0ec8Sopenharmony_ci -1 , -1, 45a46c0ec8Sopenharmony_ci}; 46a46c0ec8Sopenharmony_ci 47a46c0ec8Sopenharmony_ciTEST_DEVICE("mouse-format-string", 48a46c0ec8Sopenharmony_ci .type = LITEST_MOUSE_FORMAT_STRING, 49a46c0ec8Sopenharmony_ci .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, 50a46c0ec8Sopenharmony_ci .interface = NULL, 51a46c0ec8Sopenharmony_ci 52a46c0ec8Sopenharmony_ci .name = "Evil %s %d %x Mouse %p %", 53a46c0ec8Sopenharmony_ci .id = &input_id, 54a46c0ec8Sopenharmony_ci .absinfo = NULL, 55a46c0ec8Sopenharmony_ci .events = events, 56a46c0ec8Sopenharmony_ci) 57