Ubuntu Platform API  2.0.0
A library helping with tight integration into the Ubuntu platform
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Event Struct Reference

#include <event.h>

+ Collaboration diagram for Event:

Data Fields

EventType type
 Type of the event. More...
 
int32_t device_id
 Device that this event originated from. More...
 
int32_t source_id
 Source that this event originated from. More...
 
int32_t action
 Action signalled by this event. More...
 
int32_t flags
 Flags associated with this event. More...
 
int32_t meta_state
 State of the meta modifiers (ALT, CTRL, SHIFT). More...
 
union {
   struct HardwareSwitchEvent {
      nsecs_t   event_time
 Timestamp when the event happened. More...
 
      uint32_t   policy_flags
 Policy flags. More...
 
      int32_t   switch_code
 The scan code of the switch. More...
 
      int32_t   switch_value
 The value reported by the switch. More...
 
   }   hw_switch
 
   struct KeyEvent {
      int32_t   key_code
 
      int32_t   scan_code
 
      int32_t   repeat_count
 
      nsecs_t   down_time
 
      nsecs_t   event_time
 
      int   is_system_key
 
   }   key
 
   struct MotionEvent {
      int32_t   edge_flags
 Set for touches intersecting a touchscreen's edges, requires HW support. More...
 
      int32_t   button_state
 State of buttons of the device. More...
 
      float   x_offset
 Movement in x direction since down event. More...
 
      float   y_offset
 Movement in y direction since down event. More...
 
      float   x_precision
 Sampling precision in x direction. More...
 
      float   y_precision
 Sampling precision in y direction. More...
 
      nsecs_t   down_time
 Timestamp that marks the down event. More...
 
      nsecs_t   event_time
 Timestamp that marks when this event happened. More...
 
      size_t   pointer_count
 Number of pointers reported in this event. More...
 
      struct PointerCoordinate {
         int   id
 Unique id of the pointer. More...
 
         float   x
 
         float   raw_x
 Processed and raw x coordinates. More...
 
         float   y
 
         float   raw_y
 Processed and raw y coordinates. More...
 
         float   touch_major
 Touch major coordinate. More...
 
         float   touch_minor
 Touch minor coordinate. More...
 
         float   size
 Size of the pointer/touch. More...
 
         float   pressure
 Pressure of the touch. More...
 
         float   orientation
 Orientation. More...
 
      }   pointer_coordinates [UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]
 Pointer information, valid from [0,pointer_count). More...
 
   }   motion
 
details
 

Detailed Description

Models an input event.

Definition at line 120 of file event.h.

Field Documentation

int32_t Event::action

Action signalled by this event.

Definition at line 125 of file event.h.

int32_t Event::button_state

State of buttons of the device.

Definition at line 156 of file event.h.

union { ... } Event::details

Information specific to key/motion event types.

int32_t Event::device_id

Device that this event originated from.

Definition at line 123 of file event.h.

nsecs_t Event::down_time

Timestamp that marks the down event.

Definition at line 145 of file event.h.

int32_t Event::edge_flags

Set for touches intersecting a touchscreen's edges, requires HW support.

Definition at line 155 of file event.h.

nsecs_t Event::event_time

Timestamp when the event happened.

Timestamp that marks when this event happened.

Definition at line 134 of file event.h.

int32_t Event::flags

Flags associated with this event.

Definition at line 126 of file event.h.

struct { ... } ::HardwareSwitchEvent Event::hw_switch
int Event::id

Unique id of the pointer.

Definition at line 166 of file event.h.

int Event::is_system_key
Deprecated:
Do not use.

Definition at line 147 of file event.h.

struct { ... } ::KeyEvent Event::key
int32_t Event::key_code

Definition at line 142 of file event.h.

int32_t Event::meta_state

State of the meta modifiers (ALT, CTRL, SHIFT).

Definition at line 127 of file event.h.

struct { ... } ::MotionEvent Event::motion
float Event::orientation

Orientation.

Definition at line 173 of file event.h.

struct { ... } ::MotionEvent::PointerCoordinate Event::pointer_coordinates[UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]

Pointer information, valid from [0,pointer_count).

size_t Event::pointer_count

Number of pointers reported in this event.

Definition at line 163 of file event.h.

uint32_t Event::policy_flags

Policy flags.

Definition at line 135 of file event.h.

float Event::pressure

Pressure of the touch.

Definition at line 172 of file event.h.

float Event::raw_x

Processed and raw x coordinates.

Definition at line 167 of file event.h.

float Event::raw_y

Processed and raw y coordinates.

Definition at line 168 of file event.h.

int32_t Event::repeat_count

Definition at line 144 of file event.h.

int32_t Event::scan_code

Definition at line 143 of file event.h.

float Event::size

Size of the pointer/touch.

Definition at line 171 of file event.h.

int32_t Event::source_id

Source that this event originated from.

Definition at line 124 of file event.h.

int32_t Event::switch_code

The scan code of the switch.

Definition at line 136 of file event.h.

int32_t Event::switch_value

The value reported by the switch.

Definition at line 137 of file event.h.

float Event::touch_major

Touch major coordinate.

Definition at line 169 of file event.h.

float Event::touch_minor

Touch minor coordinate.

Definition at line 170 of file event.h.

EventType Event::type

Type of the event.

Definition at line 122 of file event.h.

float Event::x

Definition at line 167 of file event.h.

float Event::x_offset

Movement in x direction since down event.

Definition at line 157 of file event.h.

float Event::x_precision

Sampling precision in x direction.

Definition at line 159 of file event.h.

float Event::y

Definition at line 168 of file event.h.

float Event::y_offset

Movement in y direction since down event.

Definition at line 158 of file event.h.

float Event::y_precision

Sampling precision in y direction.

Definition at line 160 of file event.h.


The documentation for this struct was generated from the following file: