PebbleOS
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions
input.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <pbl/kernel/compiler.h>
#include <pbl/kernel/section.h>

Data Structures

struct  pbl_input_event
 Input event. More...
 
struct  pbl_input_callback
 Listener of input events. More...
 

Macros

#define PBL_INPUT_CALLBACK_DEFINE(_callback, _user_data)
 Define a listener of every input event.
 

Enumerations

enum  pbl_input_type : uint8_t { PBL_INPUT_EV_KEY , PBL_INPUT_EV_ABS , PBL_INPUT_EV_GES }
 Event type. More...
 
enum  : uint16_t {
  PBL_INPUT_KEY_BACK , PBL_INPUT_KEY_UP , PBL_INPUT_KEY_SELECT , PBL_INPUT_KEY_DOWN ,
  PBL_INPUT_BTN_TOUCH
}
 PBL_INPUT_EV_KEY codes. More...
 
enum  : uint16_t { PBL_INPUT_ABS_X , PBL_INPUT_ABS_Y }
 PBL_INPUT_EV_ABS codes. More...
 
enum  : uint16_t { PBL_INPUT_GES_TAP , PBL_INPUT_GES_DOUBLE_TAP , PBL_INPUT_GES_PALM }
 PBL_INPUT_EV_GES codes, located at the report's PBL_INPUT_ABS_X and Y. More...
 

Functions

void pbl_input_report (enum pbl_input_type type, uint16_t code, int32_t value, bool sync)
 Report an input event to every listener.
 
static void pbl_input_report_key (uint16_t code, bool pressed, bool sync)
 Report a key event.
 
static void pbl_input_report_abs (uint16_t code, int32_t value, bool sync)
 Report an absolute axis event.
 
static void pbl_input_report_ges (uint16_t code, bool sync)
 Report a gesture event.