From fed2da8d26b7261a6f86a5d357aa30f9d3a615e7 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 15 Oct 2024 13:11:01 +0900 Subject: [PATCH] Move time related functions from tqtinterface/tqapplication.{h,cpp} Signed-off-by: Michele Calgaro --- src/kernel/tqapplication.h | 6 ++++++ src/kernel/tqapplication_x11.cpp | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/kernel/tqapplication.h b/src/kernel/tqapplication.h index 0e884583..289df5ab 100644 --- a/src/kernel/tqapplication.h +++ b/src/kernel/tqapplication.h @@ -67,6 +67,12 @@ class TQThread; class TQApplication; extern TQ_EXPORT TQApplication *tqApp; // global application object +// X11/X.h defines Time as unsigned long +TQ_EXPORT void set_tqt_x_time(unsigned long x); +TQ_EXPORT void set_tqt_x_user_time(unsigned long x); +TQ_EXPORT unsigned long get_tqt_x_time(void); +TQ_EXPORT unsigned long get_tqt_x_user_time(void); + class TQ_EXPORT TQApplication : public TQObject { diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp index 6744532f..f180f8b9 100644 --- a/src/kernel/tqapplication_x11.cpp +++ b/src/kernel/tqapplication_x11.cpp @@ -435,6 +435,27 @@ TQ_EXPORT TQTextCodec * qt_input_mapper = 0; TQ_EXPORT Time tqt_x_time = CurrentTime; TQ_EXPORT Time tqt_x_user_time = CurrentTime; + +void set_tqt_x_time(unsigned long x) +{ + tqt_x_time = x; +} + +unsigned long get_tqt_x_time(void) +{ + return tqt_x_time; +} + +void set_tqt_x_user_time(unsigned long x) +{ + tqt_x_user_time = x; +} + +unsigned long get_tqt_x_user_time(void) +{ + return tqt_x_user_time; +} + extern bool qt_check_clipboard_sentinel(); //def in tqclipboard_x11.cpp extern bool qt_check_selection_sentinel(); //def in tqclipboard_x11.cpp