i6engine  1.0
InputConfig.h
Go to the documentation of this file.
1 /*
2  * i6engine
3  * Copyright (2016) Daniel Bonrath, Michael Baer, All rights reserved.
4  *
5  * This file is part of i6engine; i6engine is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
25 #ifndef __I6ENGINE_API_INPUTCONFIG_H__
26 #define __I6ENGINE_API_INPUTCONFIG_H__
27 
29 #include "i6engine/api/KeyCodes.h"
31 
32 #include "boost/function.hpp"
33 
34 namespace i6e {
35 namespace api {
36  enum class KeyState : uint16_t;
37 
38 namespace input {
46  };
47 
52  KeyState pressed;
53  KeyCode code;
54  uint32_t text;
56  Input_Keyboard_Update(const KeyState b, const KeyCode c, uint32_t t);
59 
64  int32_t intNewX;
65  int32_t intNewY;
67  Input_Mouse_Update(const int32_t a, const int32_t b);
68  Input_Mouse_Update * copy() { return new Input_Mouse_Update(*this); }
70 
75  int32_t diff;
77  }
78  Input_MouseWheel_Update(int32_t d);
80  return new Input_MouseWheel_Update(*this);
81  }
83 
88  void * window;
89  Input_Window_Create(void * w);
90  Input_Window_Create * copy() { return new Input_Window_Create(*this); }
92 
97  KeyCode code;
98  KeyState type;
99  boost::function<void(void)> func;
101  Input_SubscribeKeyEvent_Create(const KeyCode & c, const KeyState t, const boost::function<void(void)> & f);
104 
109  KeyCode code;
110  KeyState type;
112  }
113  Input_SubscribeKeyEvent_Delete(const KeyCode & c, const KeyState t);
115  return new Input_SubscribeKeyEvent_Delete(*this);
116  }
118 
123  std::string str;
125  }
126  Input_ConsoleRead_Create(const std::string & s);
128  return new Input_ConsoleRead_Create(*this);
129  }
131 
139  return new Input_Resolution_Update(*this);
140  }
142 
143 } /* namespace input */
144 
145 namespace keyboard {
150  };
151 } /* namespace keyboard */
152 
153 namespace mouse {
158  };
159 } /* namespace mouse */
160 
161 } /* namespace api */
162 } /* namespace i6e */
163 
164 #endif /* __I6ENGINE_API_INPUTCONFIG_H__ */
165 
updates mouse position
Definition: InputConfig.h:63
Input_ConsoleRead_Create * copy()
Copy method returning an exact copy of itself.
Definition: InputConfig.h:127
unsubscribes a pair of key and state
Definition: InputConfig.h:108
#define ISIXE_MODULES_API
notifies state of a key
Definition: InputConfig.h:51
i6e::api::input::Input_MouseWheel_Update Input_MouseWheel_Update
mouse wheel
Input_Mouse_Update * copy()
Copy method returning an exact copy of itself.
Definition: InputConfig.h:68
Input_SubscribeKeyEvent_Create * copy()
Copy method returning an exact copy of itself.
Definition: InputConfig.h:102
subscribes a key for one of the key states to call given method if state occures
Definition: InputConfig.h:96
Input_Window_Create * copy()
Copy method returning an exact copy of itself.
Definition: InputConfig.h:90
i6e::api::input::Input_Mouse_Update Input_Mouse_Update
updates mouse position
registers a RenderWindow for Input subsystem
Definition: InputConfig.h:87
i6e::api::input::Input_SubscribeKeyEvent_Delete Input_SubscribeKeyEvent_Delete
unsubscribes a pair of key and state
Input_SubscribeKeyEvent_Delete * copy()
Copy method returning an exact copy of itself.
Definition: InputConfig.h:114
Input_MouseWheel_Update * copy()
Copy method returning an exact copy of itself.
Definition: InputConfig.h:79
Input_Keyboard_Update * copy()
Copy method returning an exact copy of itself.
Definition: InputConfig.h:57
i6e::api::input::Input_SubscribeKeyEvent_Create Input_SubscribeKeyEvent_Create
subscribes a key for one of the key states to call given method if state occures
i6e::api::input::Input_ConsoleRead_Create Input_ConsoleRead_Create
read something from stdin
i6e::api::input::Input_Resolution_Update Input_Resolution_Update
updates resolution of render window
updates resolution of render window
Definition: InputConfig.h:135
i6e::api::input::Input_Window_Create Input_Window_Create
registers a RenderWindow for Input subsystem
i6e::api::input::Input_Keyboard_Update Input_Keyboard_Update
notifies state of a key
Input_Resolution_Update * copy()
Copy method returning an exact copy of itself.
Definition: InputConfig.h:138