1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef _WRAPPER_EVENT_MANAGER_HXX
11 #define _WRAPPER_EVENT_MANAGER_HXX
13 #include <boost/function.hpp>
14 #include <boost/noncopyable.hpp>
17 struct libvlc_event_manager_t
;
18 struct libvlc_event_t
;
27 class EventManager
: boost::noncopyable
31 static bool LoadSymbols();
32 typedef boost::function
<void()> Callback
;
34 EventManager( Player
& player
, EventHandler
& eh
);
36 void onPaused( const Callback
& callback
= Callback() );
37 void onEndReached( const Callback
& callback
= Callback() );
40 EventHandler
& mEventHandler
;
41 typedef boost::function
< void() > TCallback
;
42 libvlc_event_manager_t
*mManager
;
44 TCallback mOnEndReached
;
46 void registerSignal( int signal
, const Callback
& callback
);
48 static void Handler( const libvlc_event_t
*event
, void *pData
);
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */