PebbleOS
Loading...
Searching...
No Matches
Enumerations | Functions
Touch interaction session

Interaction session gating raw touch navigation. More...

Enumerations

enum  TouchSessionArmSource { TouchSessionArmSource_WakeGesture , TouchSessionArmSource_Button , TouchSessionArmSource_Injected }
 What armed the session. More...
 

Functions

void touch_session_arm (TouchSessionArmSource source)
 Open or re-open the session after deliberate interaction.
 
void touch_session_extend (void)
 Push the session deadline out, only while the session is active.
 
bool touch_session_is_active (void)
 Check whether touch may navigate.
 
void touch_session_reset (void)
 Expire the session deadline immediately.
 

Detailed Description

Interaction session gating raw touch navigation.

Raw touchdowns only navigate (and hold the backlight) while the session is active. Deliberate interaction arms it: the backlight wake gesture, a button press or injected input. Use extends it; it expires after the backlight timeout, as if the light had come on, tracked as its own deadline because bright ambient light (or DnD) can keep the backlight off. The idle watchface is the only guarded surface: any other foreground UI, a focused modal, or a backlight lit by anything other than touch counts as active. Only contact that moved or formed a gesture extends the session.

All functions run on KernelMain; the module has no locking.

Enumeration Type Documentation

◆ TouchSessionArmSource

What armed the session.

Enumerator
TouchSessionArmSource_WakeGesture 

Backlight wake gesture.

TouchSessionArmSource_Button 

Button press.

TouchSessionArmSource_Injected 

Synthetic touch injected for automated input; deliberate by construction.

Function Documentation

◆ touch_session_arm()

void touch_session_arm ( TouchSessionArmSource  source)

Open or re-open the session after deliberate interaction.

Parameters
sourceWhat armed the session.

◆ touch_session_extend()

void touch_session_extend ( void  )

Push the session deadline out, only while the session is active.

Gated contact must not keep itself alive.

◆ touch_session_is_active()

bool touch_session_is_active ( void  )

Check whether touch may navigate.

Returns
true within the armed deadline, when the foreground UI is not a watchface, a focused modal is up, or the backlight is on for a reason other than touch. Always true in recovery firmware.

◆ touch_session_reset()

void touch_session_reset ( void  )

Expire the session deadline immediately.

The overrides in touch_session_is_active() still apply.