muteki
Loading...
Searching...
No Matches
ui_event_base_s Struct Reference

Structure for low level UI events. More...

#include <common.h>

Data Fields

ui_component_trecipient
 Event recipient.
 
int event_type
 The type of event (0x10 being key event)
 
union { 
 
   struct { 
 
      unsigned short   key_code0 
 Keycode for the first pressed key. More...
 
      unsigned short   key_code1 
 Keycode for the second pressed key. More...
 
   }  
 
   struct { 
 
      unsigned short   touch_x 
 The X coordinate of where the touch event is located, in pixels. More...
 
      unsigned short   touch_y 
 The Y coordinate of where the touch event is located, in pixels. More...
 
   }  
 
};  
 
union { 
 
   void *   usb_data 
 Unknown. More...
 
   unsigned int   scroll_wheel 
 Scroll wheel direction, either SCROLL_DOWN or SCROLL_UP. More...
 
};  
 
void * unk16
 Unknown.
 
void * unk20
 Unknown.
 

Detailed Description

Structure for low level UI events.

See also
ui_event_prime_s HP Prime G1's extension of this struct.

Field Documentation

◆ event_type

int ui_event_base_s::event_type

The type of event (0x10 being key event)

See also
ui_event_type_e List of event types.

◆ key_code0

unsigned short ui_event_base_s::key_code0

Keycode for the first pressed key.

Only available when event_type is UI_EVENT_TYPE_KEY.

◆ key_code1

unsigned short ui_event_base_s::key_code1

Keycode for the second pressed key.

Only available when event_type is UI_EVENT_TYPE_KEY.

Note
Depending on the exact keys pressed simultaneously, this is not always accurate. Moreover, some devices may lack support of simultaneous key presses.

◆ recipient

ui_component_t* ui_event_base_s::recipient

Event recipient.

If set to NULL, the event is a broadcast event (e.g. input event). Otherwise, the widget's ui_component_t::on_event callback will be called with this event.

◆ scroll_wheel

unsigned int ui_event_base_s::scroll_wheel

Scroll wheel direction, either SCROLL_DOWN or SCROLL_UP.

See also
scroll_wheel_e

◆ touch_x

unsigned short ui_event_base_s::touch_x

The X coordinate of where the touch event is located, in pixels.

Only available when event_type is UI_EVENT_TYPE_TOUCH_BEGIN, UI_EVENT_TYPE_TOUCH_MOVE, or UI_EVENT_TYPE_TOUCH_END.

◆ touch_y

unsigned short ui_event_base_s::touch_y

The Y coordinate of where the touch event is located, in pixels.

Only available when event_type is UI_EVENT_TYPE_TOUCH_BEGIN, UI_EVENT_TYPE_TOUCH_MOVE, or UI_EVENT_TYPE_TOUCH_END.

◆ unk16

void* ui_event_base_s::unk16

Unknown.

Maybe used on event types other than touch and key press.

◆ unk20

void* ui_event_base_s::unk20

Unknown.

Seems to be always 0, although ClearEvent() explicitly sets this to 0. Maybe used on event types other than touch and key press.

◆ usb_data

void* ui_event_base_s::usb_data

Unknown.

Set along with a KEY_USB_INSERTION event. Seems to point to some data. Exact purpose unknown.


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