diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-10-26 19:45:35 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-10-26 19:46:15 +0100 |
commit | 90067e8007227b7f1e555a878088d81c117fee56 (patch) | |
tree | f980909fe1c008db0aa57b277c44a7022f40fd10 /vcl/headless/svpinst.cxx | |
parent | add emacs + vim modelines to the MPL license template (diff) | |
download | core-90067e8007227b7f1e555a878088d81c117fee56.tar.gz core-90067e8007227b7f1e555a878088d81c117fee56.zip |
gtk3: cleanup some code inclusion, and share timeval operators
Diffstat (limited to 'vcl/headless/svpinst.cxx')
-rw-r--r-- | vcl/headless/svpinst.cxx | 52 |
1 files changed, 2 insertions, 50 deletions
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index ad58bc5bcb00..9de3f8259968 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -45,28 +45,8 @@ #include <svdata.hxx> #include <generic/gendata.hxx> #include <vcl/solarmutex.hxx> - -// FIXME: split off into a separate, standalone module to aid linking -#ifndef GTK3_INCLUDED -class SvpSalData : public SalGenericData -{ -public: - SvpSalData( SalInstance *pInstance ) : SalGenericData( SAL_DATA_SVP, pInstance ) { } - virtual void ErrorTrapPush() {} - virtual bool ErrorTrapPop( bool ) { return false; } -}; - -// plugin factory function -extern "C" -{ - SAL_DLLPUBLIC_EXPORT SalInstance* create_SalInstance() - { - SvpSalInstance* pInstance = new SvpSalInstance( new SalYieldMutex() ); - new SvpSalData( pInstance ); - return pInstance; - } -} -#endif +// FIXME: remove when we re-work the svp mainloop +#include <unx/salunxtime.h> bool SvpSalInstance::isFrameAlive( const SalFrame* pFrame ) const { @@ -198,34 +178,6 @@ void SvpSalInstance::Wakeup() OSL_VERIFY(write (m_pTimeoutFDS[1], "", 1) == 1); } -// FIXME: share this with unx/generic [!] .... -#ifndef GTK3_INCLUDED -// -=-= timeval =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -inline int operator >= ( const timeval &t1, const timeval &t2 ) -{ - if( t1.tv_sec == t2.tv_sec ) - return t1.tv_usec >= t2.tv_usec; - return t1.tv_sec > t2.tv_sec; -} -inline timeval &operator += ( timeval &t1, sal_uLong t2 ) -{ - t1.tv_sec += t2 / 1000; - t1.tv_usec += t2 ? (t2 % 1000) * 1000 : 500; - if( t1.tv_usec > 1000000 ) - { - t1.tv_sec++; - t1.tv_usec -= 1000000; - } - return t1; -} -inline int operator > ( const timeval &t1, const timeval &t2 ) -{ - if( t1.tv_sec == t2.tv_sec ) - return t1.tv_usec > t2.tv_usec; - return t1.tv_sec > t2.tv_sec; -} -#endif - bool SvpSalInstance::CheckTimeout( bool bExecuteTimers ) { bool bRet = false; |