1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2003 Luboš Luňák <l.lunak@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef KUSERTIMESTAMP_H
9#define KUSERTIMESTAMP_H
10
11#include <kwindowsystem_export.h>
12
13namespace KUserTimestamp
14{
15/**
16 * Returns the last user action timestamp or 0 if no user activity has taken place yet.
17 * @see updateuserTimestamp
18 */
19KWINDOWSYSTEM_EXPORT unsigned long userTimestamp();
20
21/**
22 * Updates the last user action timestamp to the given time, or to the current time,
23 * if 0 is given. Do not use unless you're really sure what you're doing.
24 * Consult focus stealing prevention section in kdebase/kwin/README.
25 */
26KWINDOWSYSTEM_EXPORT void updateUserTimestamp(unsigned long time = 0);
27}
28
29#endif
30

source code of kwindowsystem/src/kusertimestamp.h