i6engine
1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
28
#include "
i6engine/api/GameMessageStruct.h
"
29
#include "
i6engine/api/KeyCodes.h
"
30
#include "
i6engine/api/configs/GraphicsConfig.h
"
31
32
#include "boost/function.hpp"
33
34
namespace
i6e
{
35
namespace
api {
36
enum class
KeyState : uint16_t;
37
38
namespace input {
39
enum
InputMessageTypes
{
40
InputReset
= 0,
41
InputWindow
,
42
InputSubscribeKeyEvent
,
43
InputConsoleRead
,
44
InputResolution
,
45
InputMessageTypesCount
46
};
47
51
typedef
struct
ISIXE_MODULES_API
Input_Keyboard_Update
:
GameMessageStruct
{
52
KeyState
pressed
;
53
KeyCode
code
;
54
uint32_t
text
;
55
Input_Keyboard_Update
() {}
56
Input_Keyboard_Update
(
const
KeyState b,
const
KeyCode c, uint32_t t);
57
Input_Keyboard_Update
*
copy
() {
return
new
Input_Keyboard_Update
(*
this
); }
58
}
Input_Keyboard_Update
;
59
63
typedef
struct
ISIXE_MODULES_API
Input_Mouse_Update
:
GameMessageStruct
{
64
int32_t
intNewX
;
65
int32_t
intNewY
;
66
Input_Mouse_Update
() {}
67
Input_Mouse_Update
(
const
int32_t a,
const
int32_t b);
68
Input_Mouse_Update
*
copy
() {
return
new
Input_Mouse_Update
(*
this
); }
69
}
Input_Mouse_Update
;
70
74
typedef
struct
ISIXE_MODULES_API
Input_MouseWheel_Update
:
GameMessageStruct
{
75
int32_t
diff
;
76
Input_MouseWheel_Update
() {
77
}
78
Input_MouseWheel_Update
(int32_t d);
79
Input_MouseWheel_Update
*
copy
() {
80
return
new
Input_MouseWheel_Update
(*
this
);
81
}
82
}
Input_MouseWheel_Update
;
83
87
typedef
struct
Input_Window_Create
:
GameMessageStruct
{
88
void
*
window
;
89
Input_Window_Create
(
void
* w);
90
Input_Window_Create
*
copy
() {
return
new
Input_Window_Create
(*
this
); }
91
}
Input_Window_Create
;
92
96
typedef
struct
Input_SubscribeKeyEvent_Create
:
GameMessageStruct
{
97
KeyCode
code
;
98
KeyState
type
;
99
boost::function<void(void)>
func
;
100
Input_SubscribeKeyEvent_Create
() {}
101
Input_SubscribeKeyEvent_Create
(
const
KeyCode & c,
const
KeyState t,
const
boost::function<
void
(
void
)> & f);
102
Input_SubscribeKeyEvent_Create
*
copy
() {
return
new
Input_SubscribeKeyEvent_Create
(*
this
); }
103
}
Input_SubscribeKeyEvent_Create
;
104
108
typedef
struct
Input_SubscribeKeyEvent_Delete
:
GameMessageStruct
{
109
KeyCode
code
;
110
KeyState
type
;
111
Input_SubscribeKeyEvent_Delete
() {
112
}
113
Input_SubscribeKeyEvent_Delete
(
const
KeyCode & c,
const
KeyState t);
114
Input_SubscribeKeyEvent_Delete
*
copy
() {
115
return
new
Input_SubscribeKeyEvent_Delete
(*
this
);
116
}
117
}
Input_SubscribeKeyEvent_Delete
;
118
122
typedef
struct
Input_ConsoleRead_Create
:
GameMessageStruct
{
123
std::string
str
;
124
Input_ConsoleRead_Create
() {
125
}
126
Input_ConsoleRead_Create
(
const
std::string & s);
127
Input_ConsoleRead_Create
*
copy
() {
128
return
new
Input_ConsoleRead_Create
(*
this
);
129
}
130
}
Input_ConsoleRead_Create
;
131
135
typedef
struct
Input_Resolution_Update
:
GameMessageStruct
{
136
graphics::Resolution
resolution
;
137
Input_Resolution_Update
(
const
graphics::Resolution
& r);
138
Input_Resolution_Update
*
copy
() {
139
return
new
Input_Resolution_Update
(*
this
);
140
}
141
}
Input_Resolution_Update
;
142
143
}
/* namespace input */
144
145
namespace
keyboard {
146
enum
KeyboardMessageTypes
{
147
KeyReset
=
input::InputMessageTypesCount
,
148
KeyKeyboard
,
149
KeyboardMessageTypesCount
150
};
151
}
/* namespace keyboard */
152
153
namespace
mouse {
154
enum
MouseMessageTypes
{
155
MouReset
=
keyboard::KeyboardMessageTypesCount
,
156
MouMouse
,
157
MouWheel
158
};
159
}
/* namespace mouse */
160
161
}
/* namespace api */
162
}
/* namespace i6e */
163
164
#endif
/* __I6ENGINE_API_INPUTCONFIG_H__ */
165
i6e::api::input::Input_Mouse_Update
updates mouse position
Definition:
InputConfig.h:63
i6e::api::input::Input_MouseWheel_Update::diff
int32_t diff
Definition:
InputConfig.h:75
i6e::api::input::Input_ConsoleRead_Create
read something from stdin
Definition:
InputConfig.h:122
i6e::api::input::Input_Resolution_Update::resolution
graphics::Resolution resolution
Definition:
InputConfig.h:136
i6e::api::input::Input_ConsoleRead_Create::copy
Input_ConsoleRead_Create * copy()
Copy method returning an exact copy of itself.
Definition:
InputConfig.h:127
i6e::core::MessageStruct
Definition:
MessageStruct.h:50
i6e::api::input::Input_SubscribeKeyEvent_Delete
unsubscribes a pair of key and state
Definition:
InputConfig.h:108
ISIXE_MODULES_API
#define ISIXE_MODULES_API
Definition:
i6eSystemParameters.h:118
i6e::api::input::Input_SubscribeKeyEvent_Delete::code
KeyCode code
Definition:
InputConfig.h:109
i6e::api::input::Input_MouseWheel_Update::Input_MouseWheel_Update
Input_MouseWheel_Update()
Definition:
InputConfig.h:76
i6e::api::mouse::MouMouse
Definition:
InputConfig.h:156
i6e::api::input::Input_SubscribeKeyEvent_Create::Input_SubscribeKeyEvent_Create
Input_SubscribeKeyEvent_Create()
Definition:
InputConfig.h:100
i6e::api::keyboard::KeyReset
Definition:
InputConfig.h:147
i6e::api::input::Input_Keyboard_Update
notifies state of a key
Definition:
InputConfig.h:51
i6e::api::input::Input_ConsoleRead_Create::str
std::string str
Definition:
InputConfig.h:123
i6e::api::input::Input_Mouse_Update::intNewX
int32_t intNewX
Definition:
InputConfig.h:64
i6e::api::keyboard::KeyboardMessageTypes
KeyboardMessageTypes
Definition:
InputConfig.h:146
i6e::api::graphics::Resolution
Definition:
GraphicsConfig.h:97
i6e::api::input::Input_MouseWheel_Update
i6e::api::input::Input_MouseWheel_Update Input_MouseWheel_Update
mouse wheel
i6e::api::input::InputResolution
Definition:
InputConfig.h:44
i6e::api::keyboard::KeyboardMessageTypesCount
Definition:
InputConfig.h:149
i6e::api::input::Input_Mouse_Update::copy
Input_Mouse_Update * copy()
Copy method returning an exact copy of itself.
Definition:
InputConfig.h:68
i6e::api::input::Input_SubscribeKeyEvent_Create::copy
Input_SubscribeKeyEvent_Create * copy()
Copy method returning an exact copy of itself.
Definition:
InputConfig.h:102
i6e::api::input::Input_Keyboard_Update::text
uint32_t text
Definition:
InputConfig.h:54
i6e::api::input::Input_SubscribeKeyEvent_Create
subscribes a key for one of the key states to call given method if state occures
Definition:
InputConfig.h:96
i6e::api::input::Input_Window_Create::copy
Input_Window_Create * copy()
Copy method returning an exact copy of itself.
Definition:
InputConfig.h:90
GameMessageStruct.h
i6e::api::mouse::MouWheel
Definition:
InputConfig.h:157
i6e::api::input::Input_Mouse_Update
i6e::api::input::Input_Mouse_Update Input_Mouse_Update
updates mouse position
i6e::api::input::Input_SubscribeKeyEvent_Delete::type
KeyState type
Definition:
InputConfig.h:110
i6e::api::input::Input_Window_Create::window
void * window
Definition:
InputConfig.h:88
i6e::api::input::Input_Window_Create
registers a RenderWindow for Input subsystem
Definition:
InputConfig.h:87
i6e::api::input::Input_SubscribeKeyEvent_Delete::Input_SubscribeKeyEvent_Delete
Input_SubscribeKeyEvent_Delete()
Definition:
InputConfig.h:111
i6e::api::input::Input_SubscribeKeyEvent_Delete
i6e::api::input::Input_SubscribeKeyEvent_Delete Input_SubscribeKeyEvent_Delete
unsubscribes a pair of key and state
i6e::api::input::Input_SubscribeKeyEvent_Delete::copy
Input_SubscribeKeyEvent_Delete * copy()
Copy method returning an exact copy of itself.
Definition:
InputConfig.h:114
i6e::api::input::Input_SubscribeKeyEvent_Create::type
KeyState type
Definition:
InputConfig.h:98
i6e::api::input::InputWindow
Definition:
InputConfig.h:41
i6e::api::input::InputReset
Definition:
InputConfig.h:40
i6e::api::input::Input_MouseWheel_Update::copy
Input_MouseWheel_Update * copy()
Copy method returning an exact copy of itself.
Definition:
InputConfig.h:79
i6e::api::input::Input_Keyboard_Update::copy
Input_Keyboard_Update * copy()
Copy method returning an exact copy of itself.
Definition:
InputConfig.h:57
i6e::api::input::Input_Keyboard_Update::pressed
KeyState pressed
Definition:
InputConfig.h:52
i6e::api::mouse::MouReset
Definition:
InputConfig.h:155
i6e::api::input::InputConsoleRead
Definition:
InputConfig.h:43
i6e::api::mouse::MouseMessageTypes
MouseMessageTypes
Definition:
InputConfig.h:154
i6e::api::input::Input_SubscribeKeyEvent_Create
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
Definition:
AutoUpdater.h:34
i6e::api::input::Input_ConsoleRead_Create
i6e::api::input::Input_ConsoleRead_Create Input_ConsoleRead_Create
read something from stdin
i6e::api::input::Input_SubscribeKeyEvent_Create::code
KeyCode code
Definition:
InputConfig.h:97
i6e::api::input::Input_Resolution_Update
i6e::api::input::Input_Resolution_Update Input_Resolution_Update
updates resolution of render window
i6e::api::input::Input_MouseWheel_Update
mouse wheel
Definition:
InputConfig.h:74
i6e::api::input::InputMessageTypes
InputMessageTypes
Definition:
InputConfig.h:39
i6e::api::input::Input_ConsoleRead_Create::Input_ConsoleRead_Create
Input_ConsoleRead_Create()
Definition:
InputConfig.h:124
i6e::api::input::Input_Resolution_Update
updates resolution of render window
Definition:
InputConfig.h:135
i6e::api::keyboard::KeyKeyboard
Definition:
InputConfig.h:148
i6e::api::input::Input_SubscribeKeyEvent_Create::func
boost::function< void(void)> func
Definition:
InputConfig.h:99
GraphicsConfig.h
i6e::api::input::Input_Mouse_Update::intNewY
int32_t intNewY
Definition:
InputConfig.h:65
i6e::api::input::Input_Window_Create
i6e::api::input::Input_Window_Create Input_Window_Create
registers a RenderWindow for Input subsystem
i6e::api::input::Input_Keyboard_Update
i6e::api::input::Input_Keyboard_Update Input_Keyboard_Update
notifies state of a key
i6e::api::input::Input_Mouse_Update::Input_Mouse_Update
Input_Mouse_Update()
Definition:
InputConfig.h:66
i6e::api::input::InputMessageTypesCount
Definition:
InputConfig.h:45
i6e::api::input::Input_Resolution_Update::copy
Input_Resolution_Update * copy()
Copy method returning an exact copy of itself.
Definition:
InputConfig.h:138
i6e::api::input::Input_Keyboard_Update::Input_Keyboard_Update
Input_Keyboard_Update()
Definition:
InputConfig.h:55
KeyCodes.h
i6e::api::input::InputSubscribeKeyEvent
Definition:
InputConfig.h:42
i6e::api::input::Input_Keyboard_Update::code
KeyCode code
Definition:
InputConfig.h:53
Projekte
i6engine
libs
i6engine-modules
include
i6engine
api
configs
InputConfig.h
Generated on Mon May 30 2016 17:33:31 for i6engine by
1.8.9.1