|
void | LongClick (ButtonId button_id, uint16_t delay_ms, ::ClickHandler down_handler, ::ClickHandler up_handler) const |
|
void | MultiClick (ButtonId button_id, uint8_t min_clicks, uint8_t max_clicks, uint16_t timeout, bool last_click_only, ::ClickHandler handler) const |
|
void | RawClick (ButtonId button_id, ::ClickHandler down_handler, ::ClickHandler up_handler) const |
|
void | SingleClick (ButtonId button_id, ::ClickHandler handler) const |
|
void | SingleRepeatingClick (ButtonId button_id, uint16_t repeat_interval_ms, ::ClickHandler handler) const |
|
◆ LongClick()
Subscribe to long click events.
- Note
- Must be called from the ClickConfigProvider.
-
The back button cannot be overridden with a long click.
- Parameters
-
button_id | The button events to subscribe to. |
delay_ms | Milliseconds after which "handler" is fired. A value of 0 means to use the system default 500ms. |
down_handler | The ClickHandler to fire as soon as the button has been held for delay_ms . This may be NULL to have no down handler. |
up_handler | The ClickHandler to fire on the release of a long click. This may be NULL to have no up handler. |
◆ MultiClick()
void Pebble::ClickConfig::MultiClick |
( |
ButtonId |
button_id, |
|
|
uint8_t |
min_clicks, |
|
|
uint8_t |
max_clicks, |
|
|
uint16_t |
timeout, |
|
|
bool |
last_click_only, |
|
|
::ClickHandler |
handler |
|
) |
| const |
|
inline |
Subscribe to multi click events.
- Note
- Must be called from the ClickConfigProvider.
- Parameters
-
button_id | The button events to subscribe to. |
min_clicks | Minimum number of clicks before handler is fired. Defaults to 2. |
max_clicks | Maximum number of clicks after which the click counter is reset. A value of 0 means use "min" also as "max". |
timeout | The delay after which a sequence of clicks is considered finished, and the click counter is reset. A value of 0 means to use the system default 300ms. |
last_click_only | Defaults to false. When true, only the handler for the last multi-click is called. |
handler | The ClickHandler to fire on this event. Fired for multi-clicks, as "filtered" by the last_click_only , min , and max parameters. |
◆ RawClick()
Subscribe to raw click events.
- Note
- Must be called from within the ClickConfigProvider.
-
The back button cannot be overridden with a raw click.
- Parameters
-
button_id | The button events to subscribe to. |
down_handler | The ClickHandler to fire as soon as the button has been pressed. This may be NULL to have no down handler. |
up_handler | The ClickHandler to fire on the release of the button. This may be NULL to have no up handler. |
context | If this context is not NULL, it will override the general context. |
◆ SingleClick()
◆ SingleRepeatingClick()
void Pebble::ClickConfig::SingleRepeatingClick |
( |
ButtonId |
button_id, |
|
|
uint16_t |
repeat_interval_ms, |
|
|
::ClickHandler |
handler |
|
) |
| const |
|
inline |
Subscribe to single click event, with a repeat interval. A single click is detected every time "repeat_interval_ms" has been reached.
- Note
- Must be called from the ClickConfigProvider.
-
window_single_click_subscribe() and window_single_repeating_click_subscribe() conflict, and cannot both be used on the same button.
-
The back button cannot be overridden with a repeating click.
- Parameters
-
button_id | The button events to subscribe to. |
repeat_interval_ms | When holding down, how many milliseconds before the handler is fired again. A value of 0ms means "no repeat timer". The minimum is 30ms, and values below will be disregarded. If there is a long-click handler subscribed on this button, repeat_interval_ms will not be used. |
handler | The ClickHandler to fire on this event. |
- See also
- SingleClick
The documentation for this class was generated from the following file: