khanat-opennel-code/code/nel/src/3d/driver/opengl/unix_event_emitter.h

71 lines
1.7 KiB
C
Raw Normal View History

2010-05-06 00:08:41 +00:00
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NL_UNIX_EVENT_EMITTER_H
#define NL_UNIX_EVENT_EMITTER_H
#include "nel/misc/types_nl.h"
#include "nel/misc/event_emitter.h"
#include "nel/misc/events.h"
2010-05-06 00:08:41 +00:00
#ifdef NL_OS_UNIX
#include <GL/gl.h>
#include <GL/glx.h>
namespace NLMISC {
/**
* TODO Class description
* \author Vianney Lecroart
* \author Nevrax France
* \date 2000
*/
class CUnixEventEmitter : public IEventEmitter
{
public:
/// Constructor
CUnixEventEmitter();
2010-05-06 00:08:41 +00:00
void init (Display *dpy, Window win);
2010-05-06 00:08:41 +00:00
/**
* sends all events to server
* (should call CEventServer method postEvent() )
* \param server
*/
virtual void submitEvents(CEventServer & server, bool allWindows);
public:
void processMessage (XEvent &event, CEventServer &server);
private:
2010-05-06 00:08:41 +00:00
Display *_dpy;
Window _win;
TKey _PreviousKey;
2010-05-06 00:08:41 +00:00
};
} // NLMISC
#endif // NL_OS_UNIX
#endif // NL_UNIX_EVENT_EMITTER_H
/* End of unix_event_emitter.h */