15 #include "config_awesomium.h"
16 #include "AwMouseAndKeyboard.h"
17 #include "dataNodeTransmit.h"
21 AwMouseAndKeyboard::AwMouseAndKeyboard(
const string &name):
24 _button_events_input = define_input(
"button_events", ButtonEventList::get_class_type());
25 _button_events_output = define_output(
"button_events", ButtonEventList::get_class_type());
31 if (input.
has_data(_button_events_input)) {
33 DCAST_INTO_V(button_events, input.
get_data(_button_events_input).
get_ptr());
36 for (
int i = 0; i < num_events; i++) {
38 string event_name = be._button.
get_name();
39 printf(
"Button Event! : %s with code %i and index %i ", event_name.c_str(), be._keycode, be._button.
get_index());
40 if(be._type == ButtonEvent::T_down) printf(
"down");
41 if(be._type == ButtonEvent::T_repeat) printf(
"repeat");
42 if(be._type == ButtonEvent::T_up) printf(
"up");
43 if(be._type == ButtonEvent::T_resume_down) printf(
"T_resume_down");
The fundamental type of node for the data graph.
const EventParameter & get_data(int index) const
Extracts the data for the indicated index, if it has been stored, or the empty parameter if it has no...
TypedWritableReferenceCount * get_ptr() const
Retrieves a pointer to the actual value stored in the parameter.
TypeHandle is the identifier used to differentiate C++ class types.
bool has_data(int index) const
Returns true if the indicated parameter has been stored, false otherwise.
Encapsulates the data generated from (or sent into) any particular DataNode.
This object supervises the traversal of the data graph and the moving of data from one DataNode to it...