// File: keyinputdata.h
// Created by: <Jörn Reimerdes>
// Created on: 22.03.2005

/**
 * keyinputdata.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 __KEYINPUTDATA_H
#define __KEYINPUTDATA_H

#ifndef __INPUTDATA_H
#include <iwear_input/inputdata.h>
#endif

namespace iwear {
namespace input {

class KeyInputData : public InputData
{

public:

    /** The code of the Key which has been pressed. */
    int32_t key_code;

    /** The key symbol */
    unsigned long key_symbol;

    /** The key state describes the modifiere keys which are pressed. 
     * Modifiers are Control, Meta, Shift, Caps.
     * These modifiers are mapped to the enum type KeyModifiers 
     * 
     * - 0 None
     * - 1 Shift
     * - 2 Caps_Lock
     * - 3 Shift and Caps_Lock
     * - 4 Control
     * - 5 Shift and Control
     * - 6 Caps_Lock and Control 
     * - 7 Shift, Caps_lock and Control
     * - 8 Meta/Alt
     * - 9 Alt and Shift
     * - 12 Control and Alt
     * - 128 AltGr
     * - 129 AltGr and Shift      
     * - 132 AltGr and Control  
     */
    uint32_t state;

    /** The type of the KeyInputEvent which relates to this data.
     */
    KeyInputEventType key_input_event_type;

    /** Creates a new KeyInputData. 
     * @param input_module The input module which created the InputData.
     * @param input_hardware_info The information of device which
     *  created the data.
     * @param key_code The code of the key which is assigned to this data.
     * @param key_input_event_type The key related input event type.
     */
    KeyInputData(InputModule* input_module, 
		 InputHardwareInfo* input_hardware_info,
		 int32_t key_code,
		 unsigned long key_symbol,
		 uint32_t state,
		 KeyInputEventType key_input_event_type);

    /** Creates a new KeyInputData. 
     * @param input_module The input module which created the InputData.
     * @param input_hardware_info The information of device which
     *  created the data.
     */
    KeyInputData(InputModule* input_module, 
		 InputHardwareInfo* input_hardware_info);

    /** Creates a new KeyInputData. */
    KeyInputData(void);

    /** Destroys the KeyInputData. */
    ~KeyInputData(void);

    /** Gets the key input event type .
     * @return The input key event type. */
    inline KeyInputEventType get_key_input_event_type( void ){
	return this->key_input_event_type;
    }    

protected:

private:

    
};
} // input
} // iwear

#endif	//__KEYINPUTDATA_H

