A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 60 lines 2.1 kB view raw
1/*************************************************************************** 2 * __________ __ ___. 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 * \/ \/ \/ \/ \/ 8 * $Id$ 9 * 10 * Copyright (C) 2008 by Maurus Cuelenaere 11 * 12 * This program is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; either version 2 15 * of the License, or (at your option) any later version. 16 * 17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 * KIND, either express or implied. 19 * 20 ****************************************************************************/ 21 22#ifndef __TOUCHSCREEN_INCLUDE_H_ 23#define __TOUCHSCREEN_INCLUDE_H_ 24 25struct touchscreen_calibration 26{ 27 int x[3][2]; 28 int y[3][2]; 29}; 30 31struct touchscreen_parameter 32{ 33 int A, B, C, D, E, F; 34 int divider; 35}; 36 37enum touchscreen_mode 38{ 39 TOUCHSCREEN_POINT = 0, /* touchscreen returns pixel co-ords */ 40 TOUCHSCREEN_BUTTON, /* touchscreen returns BUTTON_* area codes 41 actual pixel value will still be accessible 42 from button_get_data */ 43}; 44 45extern struct touchscreen_parameter calibration_parameters; 46extern const struct touchscreen_parameter default_calibration_parameters; 47int touchscreen_calibrate(struct touchscreen_calibration *cal); 48int touchscreen_to_pixels(int x, int y, int *data); 49void touchscreen_set_mode(enum touchscreen_mode mode); 50enum touchscreen_mode touchscreen_get_mode(void); 51void touchscreen_disable_mapping(void); 52void touchscreen_reset_mapping(void); 53int touchscreen_get_scroll_threshold(void); 54void touchscreen_enable(bool en); 55#ifndef HAS_BUTTON_HOLD 56void touchscreen_enable_device(bool en); 57bool touchscreen_is_enabled(void); 58#endif 59 60#endif /* __TOUCHSCREEN_INCLUDE_H_ */