TS_SETUP(3)
π TS_SETUP(3) π
okay bestie, welcome to the tslib corner of the manual, page 3, section 3, we're in the library section and we're thriving π
β¨ NAME β¨
ts_setup β find, open and configure a touch screen input device π«Ά
πΈ SYNOPSIS πΈ
#include <tslib.h>
struct tsdev *ts_setup(const char *dev_name, int nonblock);
π¦ DESCRIPTION π¦
so like. ts_setup() is the girl who does everything. she will try to find, open and configure the touch screen device. that's the whole vibe.
on success she allocates memory for a new touch screen device, opens and links the input event device to it, and loads and initialises all modules configured in the tslib configuration file TSLIB_CONFFILE. no cap, that's a lot for one function. she ate π
if dev_name is NULL, ts_setup() will use the device defined by the TSLIB_TSDEVICE environment variable.
if TSLIB_TSDEVICE is not defined, ts_setup() will try to use the following devices, in this order:
/dev/input/ts,/dev/input/touchscreen,/dev/touchscreen/ucb1x00.
and after that, ts_setup() scans /dev/input/event* for the first device with property INPUT_PROP_DIRECT. she's persistent. she's not giving up on you. iconic behaviour honestly β¨
π RETURN VALUE π
a pointer to the opened struct tsdev is returned. that's it, that's the tea π
π SEE ALSO π
okay that's the whole page bestie, go touch some screens (literally) π this one comes to you straight from tslib, TS_SETUP(3), and yeah she's got no date on her but she's timeless fr fr ππ
π¦ where this page comes from
- alpine 3.24: tslib-doc 1.24-r0 Β· LGPL-2.0-or-later
- arch rolling: tslib 1.24-1 Β· LGPL-2.1-only
- debian bookworm: libts0 1.22-1+b1 Β· LGPL-2.0-or-later
- debian trixie: libts0t64 1.22-1.1+b1 Β· LGPL-2.0-or-later
- epel 10: tslib 1.23-2.el10_2 Β· LGPL-2.1-only
- epel 9: tslib 1.22-5.el9 Β· LGPLv2
- fedora 43: tslib 1.23-2.fc43 Β· LGPL-2.1-only
- fedora 43: tslib 1.23-2.fc43 Β· LGPL-2.1-only
- fedora 44: tslib 1.24-2.fc44 Β· LGPL-2.1-only
- fedora 44: tslib 1.24-2.fc44 Β· LGPL-2.1-only
- nixos 26.05: tslib 1.24
- nixpkgs unstable: tslib 1.24
- opensuse-leap 16.0: tslib 1.22-160000.2.2 Β· LGPL-2.1-or-later AND GPL-2.0-only
- opensuse-leap 16.0: tslib 1.22-160000.2.2 Β· LGPL-2.1-or-later AND GPL-2.0-only
- opensuse-leap 16.0: tslib 1.22-160000.2.2 Β· LGPL-2.1-or-later AND GPL-2.0-only
- opensuse-leap 16.0: tslib 1.22-160000.2.2 Β· LGPL-2.1-or-later AND GPL-2.0-only
- ubuntu jammy: libts0 1.22-1 Β· LGPL-2.0-or-later
- ubuntu noble: libts0t64 1.22-1.1build1 Β· LGPL-2.0-or-later
- ubuntu questing: libts0t64 1.22-1.1build1
- ubuntu resolute: libts0t64 1.22-1.1build2 Β· LGPL-2.0-or-later
- ubuntu stonking: libts0t64 1.22-1.1build2 Β· LGPL-2.0-or-later
- Copyright (c) 2017, Martin Kepplinger <martink@posteo.de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms