// File: x11inputmodule.cpp
// Created by: <Falko Buttler>
// Created on: 15.04.2005

/**
 * x11inputmodule.h - is part of the iwear-framework
 * @file
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 * In particular this file is part of the Framework Input Library
 *
 * The iWear Framework is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation as in version 2 of the License.

 * 
 * The iWear Framework 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 General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __X11INPUTMODULE_H
#define __X11INPUTMODULE_H

#ifndef __X11INPUTTHREAD_H
#include <iwear_input_x11/x11inputthread.h>
#endif

#ifndef __INPUTMANAGER_H
#include <iwear_input/inputmanager.h>
#endif

#ifndef __INPUTMODULE_H
#include <iwear_input/inputmodule.h>
#endif


using namespace iwear::input;

namespace iwear { 
namespace input {
//    class InputManager;

namespace x11 {

    /** Interface for all X11InputModules that will be implemented.
     * The X11InputModule implements all features which are needed by 
     * all X11inputmodules. 
     * Inheriting classes must add the InputEventTypes to the
     * input_event_types list.
     */
    class X11InputModule : public InputModule {
	
    public:

  	/** Creates a new X11InputModule. 
   	 * @param input_manager a pointer to the
	 *  input_manager to which the X11InputModule should be registered
	 * to.
	 */
	X11InputModule(InputManager* input_manager, Configuration& conf);

	X11InputModule(InputManager* input_manager, bool grab_keys, 
		       bool grab_buttons, Configuration& conf);

	/** Destroys the X11InputModule.
	 * 
	 */
	virtual ~X11InputModule();

    protected:

    private:
	uint32_t activate_power_state(iwear::power_state);

	X11InputThread* x11_input_thread;
    };
} //  namespace x11
} // namespace input
} //namespace iwear

#endif	// __X11INPUTMODULE_H

