1 // Copyright 2019 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FXCRT_TIMERHANDLER_IFACE_H_ 8 #define CORE_FXCRT_TIMERHANDLER_IFACE_H_ 9 10 #include "core/fxcrt/fx_system.h" 11 12 namespace fxcrt { 13 14 class TimerHandlerIface { 15 public: 16 static constexpr int32_t kInvalidTimerID = 0; 17 using TimerCallback = void (*)(int32_t idEvent); 18 19 virtual ~TimerHandlerIface() = default; 20 21 virtual int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) = 0; 22 virtual void KillTimer(int32_t nTimerID) = 0; 23 }; 24 25 } // namespace fxcrt 26 27 using fxcrt::TimerHandlerIface; 28 29 #endif // CORE_FXCRT_TIMERHANDLER_IFACE_H_ 30