MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_event.h File Reference

Legato event definitions. More...

Include dependency graph for legato_event.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  leEvent
 This enum presents a event. An event contains valid event ids. More...
 
struct  leEventState
 This struct represents an event state. More...
 

Typedefs

typedef enum leEventID leEventID
 This enum represents valid event IDs. More...
 
typedef struct leEvent leEvent
 This enum presents a event. An event contains valid event ids.
 
typedef leBool(* leEvent_FilterEvent) (leEvent *)
 FilterEvent function pointer. More...
 
typedef struct leEventState leEventState
 This struct represents an event state. More...
 
typedef enum leEventResult leEventResult
 This enum represents an event result. More...
 

Enumerations

enum  leEventID {
  LE_EVENT_NONE, LE_EVENT_TOUCH_DOWN, LE_EVENT_TOUCH_UP, LE_EVENT_TOUCH_MOVE,
  LE_EVENT_LANGUAGE_CHANGED, LE_WIDGET_EVENT_PAINT = 100, LE_WIDGET_EVENT_MOVED, LE_WIDGET_EVENT_RESIZED,
  LE_WIDGET_EVENT_FOCUS_GAINED, LE_WIDGET_EVENT_FOCUS_LOST
}
 This enum represents valid event IDs. More...
 
enum  leEventResult { LE_EVENT_HANDLED, LE_EVENT_DEFERRED, LE_EVENT_RESET_QUEUE }
 This enum represents an event result. More...
 

Functions

uint32_t leEvent_GetCount (void)
 Get Event Count. More...
 
leResult leEvent_SetFilter (leEvent_FilterEvent cb)
 Set filter event callback. More...
 
leResult leEvent_AddEvent (leEvent *evt)
 Add event. More...
 
leResult leEvent_ClearList (void)
 Clear event list. More...
 
leResult leEvent_ProcessEvents (void)
 Process events. More...
 

Detailed Description

Legato event definitions.

Defines events that are used in the UI library. Events are created and stored for later processing during a library context's update loop.

Typedef Documentation

◆ leEvent_FilterEvent

typedef leBool(* leEvent_FilterEvent) (leEvent *)

FilterEvent function pointer.

Function pointer to define an event filter. Event filters allow a receiver to discard undesirable events

◆ leEventID

typedef enum leEventID leEventID

This enum represents valid event IDs.

Event IDs are used for internal and widget events are as follows:

◆ leEventResult

This enum represents an event result.

Event result is used to define the possible internal event states.

◆ leEventState

typedef struct leEventState leEventState

This struct represents an event state.

Structure to manage the event lists, state and call back pointers.

Enumeration Type Documentation

◆ leEventID

enum leEventID

This enum represents valid event IDs.

Event IDs are used for internal and widget events are as follows:

Enumerator
LE_EVENT_NONE 

No event found.

LE_EVENT_TOUCH_DOWN 

Touch down event.

LE_EVENT_TOUCH_UP 

Touch up event.

LE_EVENT_TOUCH_MOVE 

Touch move event.

LE_EVENT_LANGUAGE_CHANGED 

Language changed.

LE_WIDGET_EVENT_PAINT 

Paint event.

LE_WIDGET_EVENT_MOVED 

Moved event.

LE_WIDGET_EVENT_RESIZED 

Resized event.

LE_WIDGET_EVENT_FOCUS_GAINED 

Focus gained event.

LE_WIDGET_EVENT_FOCUS_LOST 

Focus lost event.

◆ leEventResult

This enum represents an event result.

Event result is used to define the possible internal event states.

Enumerator
LE_EVENT_HANDLED 

the event was handled.

LE_EVENT_DEFERRED 

the event needs to wait.

LE_EVENT_RESET_QUEUE 

the entire event queue should be flushed and reset.

Function Documentation

◆ leEvent_AddEvent()

leResult leEvent_AddEvent ( leEvent evt)

Add event.

Adds event to the list of events maintained by the current context.

leResult result = leEvent_AddEvent(evt);
Parameters
void.
Returns
LE_SUCCESS if set, otherwise LE_FAILURE.

◆ leEvent_ClearList()

leResult leEvent_ClearList ( void  )

Clear event list.

Clears the event list maintained by the current context.

Returns
LE_SUCCESS if set, otherwise LE_FAILURE.
Here is the call graph for this function:

◆ leEvent_GetCount()

uint32_t leEvent_GetCount ( void  )

Get Event Count.

Returns the number of events listed in the current context.

uint32_t nbr = leEvent_GetCount();
Returns
number of events.

◆ leEvent_ProcessEvents()

leResult leEvent_ProcessEvents ( void  )

Process events.

Processes any pending events.

Returns
LE_SUCCESS if set, otherwise LE_FAILURE.
Here is the caller graph for this function:

◆ leEvent_SetFilter()

leResult leEvent_SetFilter ( leEvent_FilterEvent  cb)

Set filter event callback.

Set filter event callback to cb.

@param cb the event callback
Returns
LE_SUCCESS if set, otherwise LE_FAILURE.