nInputServer Class Reference
[Input Subsystem]
#include <ninputserver.h>
Inheritance diagram for nInputServer:

Detailed Description
Manage input devices, events and mappings.See also nInputServer Script Interface
(C) 2002 RadonLabs GmbH
Definition at line 24 of file ninputserver.h.
Public Member Functions | |
| nInputServer () | |
| constructor | |
| virtual | ~nInputServer () |
| destructor | |
| virtual void | Open () |
| open the input server | |
| virtual void | Trigger (double time) |
| per frame trigger | |
| nInputEvent * | NewEvent () |
| create a new input event object | |
| void | ReleaseEvent (nInputEvent *event) |
| release an input event object | |
| void | LinkEvent (nInputEvent *event) |
| link input event object into global input event list | |
| void | UnlinkEvent (nInputEvent *event) |
| unlink input event object from global input event list | |
| void | FlushEvents () |
| flush (clear) global input event list | |
| nInputEvent * | FirstEvent () |
| return pointer to first input event in global input event list | |
| nInputEvent * | NextEvent (nInputEvent *) |
| return pointer to next event in global input event list | |
| void | BeginMap () |
| begin mapping input events | |
| bool | Map (const char *event, const char *state) |
| map an input event to an input state | |
| void | EndMap () |
| finish mapping input | |
| float | GetSlider (const char *state) |
| get an input state as slider value | |
| bool | GetButton (const char *state) |
| get an input state as button value | |
| const vector2 & | GetMousePos () const |
| get the current mouse pos | |
| void | StartLogging () |
| start logging input | |
| void | StopLogging () |
| stop logging input | |
| bool | IsLogging () |
| is currently logging input? | |
| void | SetLongPressedTime (float) |
| set the long pressed time | |
| float | GetLongPressedTime () |
| get the long pressed time | |
| void | SetDoubleClickTime (float) |
| set the double click time | |
| float | GetDoubleClickTime () |
| get the double click time | |
| void | SetMouseFactor (float s) |
| set mouse sensitivity | |
| float | GetMouseFactor () const |
| get mouse sensitivity | |
| void | SetMouseInvert (bool b) |
| set invert mouse flag | |
| bool | GetMouseInvert () const |
| get invert mouse flag | |
| void | ObtainFocus () |
| call when input focus obtained | |
| void | LoseFocus () |
| call when input focus lost | |
| void | FlushInput () |
| flush entire input mapping | |
| void | SetMute (bool b) |
| set mute mode on/off | |
| bool | GetMute () const |
| get mute mode | |
Static Public Member Functions | |
| static nInputServer * | Instance () |
| get instance pointer | |
Protected Types | |
| enum | { N_MAXNUM_SCRIPTS = 16 } |
Protected Member Functions | |
| bool | MapStrToEvent (const char *str, nInputEvent *event) |
| convert an input event string into an input event | |
| nInputEvent * | FirstIdenticalEvent (nInputEvent *pattern) |
| return pointer to first matching event | |
| nInputEvent * | NextIdenticalEvent (nInputEvent *pattern, nInputEvent *cur) |
| return pointer to next matching event | |
| void | DoInputMapping () |
| do actual input mapping | |
| void | BeginScripts () |
| begin adding a script to execute | |
| void | AddScript (const char *script) |
| add a script to execute | |
| void | EndScripts () |
| finish adding script | |
| bool | IsIdenticalEvent (nInputEvent *event0, nInputEvent *event1) |
| check if events are identical | |
| void | LogSingleEvent (nInputEvent *event) |
| log a single event | |
| void | LogEvents () |
| log all events | |
| nInputState * | GetInputState (const char *state) |
| find input state object by name | |
| nInputState * | AddInputState (const char *state) |
| add a named input state | |
| void | ExportDefaultKeyboard () |
| export the default keyboard | |
| void | ExportDefaultMouse () |
| export the default mouse | |
| const char * | BuildInputMappingName (const char *ieStr, const char *isStr, char *buf, int bufSize) |
| build an input mapping name | |
Protected Attributes | |
| double | timeStamp |
| nAutoRef< nScriptServer > | ref_ss |
| nAutoRef< nConServer > | ref_con |
| nRef< nRoot > | ref_statedir |
| nRef< nRoot > | ref_inpdir |
| nList | events |
| bool | log_events |
| bool | in_begin_map |
| bool | mute |
| nHashList | im_list |
| nHashList | is_list |
| int | act_script |
| const char * | script_array [N_MAXNUM_SCRIPTS] |
| double | long_pressed_time |
| double | double_click_time |
| float | mouseFactor |
| bool | mouseInvert |
| vector2 | mousePos |
Member Enumeration Documentation
|
|
Reimplemented from nRoot. Definition at line 136 of file ninputserver.h. |
Constructor & Destructor Documentation
|
|
constructor
Definition at line 98 of file ninput_main.cc. |
|
|
destructor
Definition at line 127 of file ninput_main.cc. |
Member Function Documentation
|
|
get instance pointer
Definition at line 172 of file ninputserver.h. |
|
|
open the input server
Reimplemented in nDI8Server. Definition at line 162 of file ninput_main.cc. |
|
|
per frame trigger Do the usual per frame stuff, especially mapping raw events to cooked input states.
Reimplemented in nDI8Server. Definition at line 267 of file ninput_main.cc. |
|
|
create a new input event object
Definition at line 12 of file ninput_events.cc. |
|
|
release an input event object
Definition at line 20 of file ninput_events.cc. |
|
|
link input event object into global input event list
Definition at line 33 of file ninput_events.cc. |
|
|
unlink input event object from global input event list
Definition at line 43 of file ninput_events.cc. |
|
|
flush (clear) global input event list
Definition at line 53 of file ninput_events.cc. |
|
|
return pointer to first input event in global input event list
Definition at line 92 of file ninput_events.cc. |
|
|
return pointer to next event in global input event list
Definition at line 101 of file ninput_events.cc. |
|
|
begin mapping input events
Definition at line 42 of file ninput_states.cc. |
|
||||||||||||
|
map an input event to an input state
Definition at line 83 of file ninput_states.cc. |
|
|
finish mapping input
Definition at line 181 of file ninput_states.cc. |
|
|
get an input state as slider value
Definition at line 230 of file ninput_states.cc. |
|
|
get an input state as button value
Definition at line 247 of file ninput_states.cc. |
|
|
get the current mouse pos
Definition at line 205 of file ninputserver.h. |
|
|
start logging input
Definition at line 14 of file ninput_log.cc. |
|
|
stop logging input
Definition at line 30 of file ninput_log.cc. |
|
|
is currently logging input?
Definition at line 45 of file ninput_log.cc. |
|
|
set the long pressed time
Definition at line 213 of file ninput_main.cc. |
|
|
get the long pressed time
Definition at line 222 of file ninput_main.cc. |
|
|
set the double click time
Definition at line 231 of file ninput_main.cc. |
|
|
get the double click time
Definition at line 239 of file ninput_main.cc. |
|
|
set mouse sensitivity
Definition at line 215 of file ninputserver.h. |
|
|
get mouse sensitivity
Definition at line 226 of file ninputserver.h. |
|
|
set invert mouse flag
Definition at line 236 of file ninputserver.h. |
|
|
get invert mouse flag
Definition at line 247 of file ninputserver.h. |
|
|
call when input focus obtained
Definition at line 320 of file ninput_states.cc. |
|
|
call when input focus lost
Definition at line 342 of file ninput_states.cc. |
|
|
flush entire input mapping Flush events, states and mappings. Definition at line 64 of file ninput_events.cc. |
|
|
set mute mode on/off Set mute mode on/off. When in mute mode, only raw events will be generated, but no input mapping takes place. Definition at line 185 of file ninputserver.h. |
|
|
get mute mode
Definition at line 195 of file ninputserver.h. |
|
||||||||||||
|
convert an input event string into an input event Maps a string of the form "devN:channel" to an nInputEvent. The directory structure under /sys/share/input/devs is used to determine if the device exists and the channel is supported. If not, the nInputEvent is invalid and the function returns false. Definition at line 218 of file ninput_events.cc. |
|
|
return pointer to first matching event
Definition at line 162 of file ninput_events.cc. |
|
||||||||||||
|
return pointer to next matching event
Definition at line 180 of file ninput_events.cc. |
|
|
do actual input mapping
Definition at line 264 of file ninput_states.cc. |
|
|
begin adding a script to execute
Definition at line 171 of file ninput_main.cc. |
|
|
add a script to execute
Definition at line 180 of file ninput_main.cc. |
|
|
finish adding script
Definition at line 192 of file ninput_main.cc. |
|
||||||||||||
|
check if events are identical
Definition at line 109 of file ninput_events.cc. |
|
|
log a single event
Definition at line 53 of file ninput_log.cc. |
|
|
log all events
Definition at line 107 of file ninput_log.cc. |
|
|
find input state object by name
Definition at line 13 of file ninput_states.cc. |
|
|
add a named input state
Definition at line 23 of file ninput_states.cc. |
|
|
export the default keyboard
Definition at line 25 of file ninput_main.cc. |
|
|
export the default mouse
Definition at line 64 of file ninput_main.cc. |
|
||||||||||||||||||||
|
build an input mapping name Build input mapping name from input event string and input state string.
Definition at line 72 of file ninput_states.cc. |
Member Data Documentation
|
|
Definition at line 141 of file ninputserver.h. |
|
|
Definition at line 143 of file ninputserver.h. |
|
|
Definition at line 144 of file ninputserver.h. |
|
|
Definition at line 145 of file ninputserver.h. |
|
|
Definition at line 146 of file ninputserver.h. |
|
|
Definition at line 148 of file ninputserver.h. |
|
|
Definition at line 150 of file ninputserver.h. |
|
|
Definition at line 151 of file ninputserver.h. |
|
|
Definition at line 152 of file ninputserver.h. |
|
|
Definition at line 154 of file ninputserver.h. |
|
|
Definition at line 155 of file ninputserver.h. |
|
|
Definition at line 157 of file ninputserver.h. |
|
|
Definition at line 158 of file ninputserver.h. |
|
|
Definition at line 160 of file ninputserver.h. |
|
|
Definition at line 161 of file ninputserver.h. |
|
|
Definition at line 162 of file ninputserver.h. |
|
|
Definition at line 163 of file ninputserver.h. |
|
|
Definition at line 164 of file ninputserver.h. |
The documentation for this class was generated from the following files: