/* -*- 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_INC_SALUSEREVENTLIST_HXX #define INCLUDED_VCL_INC_SALUSEREVENTLIST_HXX #include #include #include #include #include #include class SalFrame; enum class SalEvent; struct SalFrameHash : public std::hash { size_t operator()(const SalFrame* frame) const { return std::hash::operator()( reinterpret_cast(frame) ); } }; typedef std::unordered_set< SalFrame*, SalFrameHash > SalFrameSet; class VCL_PLUGIN_PUBLIC SalUserEventList { public: struct SalUserEvent { SalFrame* m_pFrame; void* m_pData; SalEvent m_nEvent; SalUserEvent( SalFrame* pFrame, void* pData, SalEvent nEvent ) : m_pFrame( pFrame ), m_pData( pData ), m_nEvent( nEvent ) {} bool operator==(const SalUserEvent &aEvent) const { return m_pFrame == aEvent.m_pFrame && m_pData == aEvent.m_pData && m_nEvent== aEvent.m_nEvent; } }; protected: mutable osl::Mutex m_aUserEventsMutex; std::list< SalUserEvent > m_aUserEvents; std::list< SalUserEvent > m_aProcessingUserEvents; bool m_bAllUserEventProcessedSignaled; SalFrameSet m_aFrames; oslThreadIdentifier m_aProcessingThread; virtual void ProcessEvent( SalUserEvent aEvent ) = 0; virtual void TriggerUserEventProcessing() = 0; virtual void TriggerAllUserEventsProcessed() {} public: SalUserEventList(); virtual ~SalUserEventList() COVERITY_NOEXCEPT_FALSE; inline const SalFrameSet& getFrames() const; inline SalFrame* anyFrame() const; void insertFrame( SalFrame* pFrame ); void eraseFrame( SalFrame* pFrame ); inline bool isFrameAlive( const SalFrame* pFrame ) const; void PostEvent( SalFrame* pFrame, void* pData, SalEvent nEvent ); void RemoveEvent( SalFrame* pFrame, void* pData, SalEvent nEvent ); inline bool HasUserEvents() const; bool DispatchUserEvents( bool bHandleAllCurrentEvents ); }; inline SalFrame* SalUserEventList::anyFrame() const { if ( m_aFrames.empty() ) return nullptr; return *m_aFrames.begin(); } inline bool SalUserEventList::isFrameAlive( const SalFrame* pFrame ) const { auto it = m_aFrames.find( const_cast( pFrame ) ); return it != m_aFrames.end(); } inline bool SalUserEventList::HasUserEvents() const { osl::MutexGuard aGuard( m_aUserEventsMutex ); return !(m_aUserEvents.empty() && m_aProcessingUserEvents.empty()); } inline void SalUserEventList::PostEvent( SalFrame* pFrame, void* pData, SalEvent nEvent ) { osl::MutexGuard aGuard( m_aUserEventsMutex ); m_aUserEvents.push_back( SalUserEvent( pFrame, pData, nEvent ) ); m_bAllUserEventProcessedSignaled = false; TriggerUserEventProcessing(); } inline const SalFrameSet& SalUserEventList::getFrames() const { return m_aFrames; } #endif // INCLUDED_VCL_INC_SALUSEREVENTLIST_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ tro/collabora/cp-5.3-desktop'>distro/collabora/cp-5.3-desktop LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-15just use turbo-jpeg as sole internal solutionCaolán McNamara
prefer having nasm/yasm but if its not there warn and fallback to disabling assembler optional goodness Change-Id: Ib31ad81717842f743c2910d575a9ebbc279a9c79 Reviewed-on: https://gerrit.libreoffice.org/35189 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-02Drop support for MSVC 2013David Ostrovsky
Change-Id: Ibf47c9ff7b5fb098e284a58c547b61286264dd80 Reviewed-on: https://gerrit.libreoffice.org/22588 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-23gpg4libre: Fix build by s/gpgme/gpgmepp/ on multiple placesKatarina Behrens
let's see if it appeases the tinderboxes Change-Id: Icfe97381395f5554d51cfb52289b3de89abbbb68 Reviewed-on: https://gerrit.libreoffice.org/34569 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-02-10Remove MinGW supportStephan Bergmann
In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-10add --disable-pdfiumCaolán McNamara
Change-Id: I9137dc0030c3c752ffc0931721bf6b0013309d39
2017-02-08external: bundle pdfiumMiklos Vajna
Initial use case is to avoid creating a whole Draw document + a poppler process for each and every PDF image we load in a document. The MSVC patch is only to support MSVC 2013, as upstream already moved to MSVC 2015. Change-Id: I3c9dbac3e3de9f2e874ca4cfec0a9dd8a388b87c Reviewed-on: https://gerrit.libreoffice.org/34022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-03gpg4libre: Download external gpgme and dependent libsKatarina Behrens
in particular, libgpg-error and libassuan This only downloads and unpacks the tarball. Building them needs some work still Change-Id: I562fd01571929ddfb47a319038f88ea8dbfb4bdd Reviewed-on: https://gerrit.libreoffice.org/33712 Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>