input_event.h

Go to the documentation of this file.
00001 /*
00002 **  ClanLib SDK
00003 **  Copyright (c) 1997-2009 The ClanLib Team
00004 **
00005 **  This software is provided 'as-is', without any express or implied
00006 **  warranty.  In no event will the authors be held liable for any damages
00007 **  arising from the use of this software.
00008 **
00009 **  Permission is granted to anyone to use this software for any purpose,
00010 **  including commercial applications, and to alter it and redistribute it
00011 **  freely, subject to the following restrictions:
00012 **
00013 **  1. The origin of this software must not be misrepresented; you must not
00014 **     claim that you wrote the original software. If you use this software
00015 **     in a product, an acknowledgment in the product documentation would be
00016 **     appreciated but is not required.
00017 **  2. Altered source versions must be plainly marked as such, and must not be
00018 **     misrepresented as being the original software.
00019 **  3. This notice may not be removed or altered from any source distribution.
00020 **
00021 **  Note: Some of the libraries ClanLib may link to may have additional
00022 **  requirements or restrictions.
00023 **
00024 **  File Author(s):
00025 **
00026 **    Magnus Norddahl
00027 **    Harry Storbacka
00028 */
00029 
00032 
00033 #pragma once
00034 
00035 #include "../api_display.h"
00036 #include "input_device.h"
00037 #include "../../Core/Math/point.h"
00038 
00039 class CL_InputEvent_Impl;
00040 
00044 class CL_API_DISPLAY CL_InputEvent
00045 {
00046 public:
00048         enum Type
00049         {
00050                 no_key            = 0,
00051                 pressed           = 1,
00052                 released          = 2,
00053                 doubleclick       = 3,
00054                 pointer_moved     = 4,
00055                 axis_moved        = 5,
00056                 ball_moved        = 6,
00057                 proximity_change  = 7,
00058         };
00059 
00061         enum TabletAxisID
00062         {
00063                 x_axis            = 0,
00064                 y_axis            = 1,
00065                 z_axis            = 2,
00066                 tilt_x            = 3,
00067                 tilt_y            = 4,
00068                 rotation_pitch    = 6,
00069                 rotation_roll     = 7,
00070                 rotation_yaw      = 8,
00071                 proximity_enter   = 9,
00072                 proximity_exit    = 10
00073         };
00074 
00077 
00078 public:
00080         CL_InputEvent();
00081 
00082         ~CL_InputEvent();
00083 
00087 
00088 public:
00089 
00093 
00094 public:
00096         int id;
00097 
00099 
00104         CL_String str;
00105 
00107         Type type;
00108 
00110         CL_InputDevice device;
00111 
00113         CL_Point mouse_pos;
00114 
00116         double axis_pos;
00117 
00119 
00121         int repeat_count;
00122 
00124         bool alt;
00125         bool shift;
00126         bool ctrl;
00127 
00131 
00132 private:
00133         CL_SharedPtr<CL_InputEvent_Impl> impl;
00135 };
00136 

Generated on Thu Dec 3 02:39:29 2009 for ClanLib by  doxygen 1.4.6