/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_VCL_TIMER_HXX #define INCLUDED_VCL_TIMER_HXX #include #include class VCL_DLLPUBLIC Timer : public Task { Link maInvokeHandler; ///< Callback Link sal_uInt64 mnTimeout; const bool mbAuto; protected: virtual void SetDeletionFlags() override; virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nTimeNow ) const override; Timer( bool bAuto, const char *pDebugName ); public: Timer( const char *pDebugName ); Timer( const Timer& rTimer ); virtual ~Timer() override; Timer& operator=( const Timer& rTimer ); /** * Calls the maInvokeHandler with the parameter this. */ virtual void Invoke() override; /** * Calls the maInvokeHandler with the parameter. * * Convenience Invoke function, mainly used to call with nullptr. * * @param arg parameter for the Link::Call function */ void Invoke( Timer *arg ); void SetInvokeHandler( const Link& rLink ) { maInvokeHandler = rLink; } void ClearInvokeHandler() { SetInvokeHandler( Link() ); } void SetTimeout( sal_uInt64 nTimeoutMs ); sal_uInt64 GetTimeout() const { return mnTimeout; } virtual void Start(bool bStartTimer = true) override; }; /// An auto-timer is a multi-shot timer re-emitting itself at /// interval until destroyed or stopped. class VCL_DLLPUBLIC AutoTimer : public Timer { public: AutoTimer( const char *pDebugName ); }; /// Value suitable as a timeout user input into an EditBox to an expensive update #define EDIT_UPDATEDATA_TIMEOUT 350 #endif // INCLUDED_VCL_TIMER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -23.05 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2023-01-27Remove support for AIXStephan Bergmann
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
2022-04-29use more string_view in INetURLObjectNoel Grandin
2020-07-30terminate XDesktop properly in unit testsNoel Grandin
2020-02-24tdf#42949 Fix IWYU warnings in svx/source/[f-m]*/*cxxGabor Kelemen
2020-01-26remove some unused local varsNoel Grandin
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
2019-10-21size some stringbuffer to prevent re-allocNoel Grandin
2019-06-18loplugin:logexceptionnicely in svxNoel Grandin
2018-11-19Simplify containers iterations in svx/source/[f-i]*Arkadiy Illarionov
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin
2018-09-17New loplugin:externalStephan Bergmann
2018-08-02Add missing sal/log.hxx headersGabor Kelemen
2018-07-30SHELLCHECK_WARNING, VERBOSE is unusedCaolán McNamara
2018-06-25Fix "javaPathHelper: not found" errors during startup.Thomas Klausner
2018-06-22teach useuniqueptr loplugin about calling delete on a paramNoel Grandin
2018-03-19remove unused ucbstreamhelper includesJochen Nitschke
2018-02-01Fix typosAndrea Gelmini
2018-01-09-Werror,-Wformat (clang-cl)Stephan Bergmann
2017-12-18coverity#1426163 Improper use of negative valueCaolán McNamara
2017-12-14sal_uIntPtr->sal_Int32 in GalleryThemeNoel Grandin
2017-10-04add << operator for css::uno::ExceptionNoel Grandin
2017-05-30Fix quotingStephan Bergmann
2017-05-20tdf#105204: ShellCheck nitpicks for gengal.shYeliz Taneroğlu
2017-03-08make SfxGetpApp just get and move GetOrCreate to the peripheryCaolán McNamara
2017-02-10Remove MinGW supportStephan Bergmann
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin
2016-12-11OSL_TRACE -> SAL in sfx2..svxNoel Grandin
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin
2016-11-29Rewrite some (trivial) assignments inside if/while conditions: svxStephan Bergmann
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-11-06coverity#1338251 Uncaught exceptionCaolán McNamara
2015-11-05use uno::Reference::set method instead of assignmentNoel Grandin
2015-10-31com::sun::star->css in svxNoel Grandin
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-10-01Fix typosAndrea Gelmini
2015-09-12GetCommandLineParamCount() returns sal_uInt16Matteo Casalin
2014-11-28Fold URE: Linux ure/lib/* -> program/Stephan Bergmann
2014-11-28Fold URE: Linux ure/bin/* -> program/Stephan Bergmann
2014-11-05coverity#1000852 Uncaught exceptionCaolán McNamara
2014-06-09gbuild, gengal: Win32 make command line limit strikes again ...Michael Stahl
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann