Pebble Foundation Classes  0.2.0
C++ for Pebble
AppFocusHandlers Struct Reference

#include <pebble.h>

Public Attributes

AppFocusHandler will_focus
 
AppFocusHandler did_focus
 

Detailed Description

There are two different focus events which take place when transitioning to and from an app being in focus. Below is an example of when these events will occur: 1) The app is launched. Once the system animation to the app has completed and the app is completely in focus, the did_focus handler is called with in_focus set to true. 2) A notification comes in and the animation to show the notification starts. The will_focus handler is called with in_focus set to false. 3) The animation completes and the notification is in focus, with the app being completely covered. The did_focus hander is called with in_focus set to false. 4) The notification is dismissed and the animation to return to the app starts. The will_focus handler is called with in_focus set to true. 5) The animation completes and the app is in focus. The did_focus handler is called with in_focus set to true.

Member Data Documentation

◆ did_focus

AppFocusHandler AppFocusHandlers::did_focus

Handler which will be called when an animation finished which has put the app into focus or taken the app out of focus.

Note
This will be called with in_focus set to true when a window which was covering the app has closed and the app has gained focus.
This will be called with in_focus set to false when a window has opened which is now covering the app, causing the app to lose focus.

◆ will_focus

AppFocusHandler AppFocusHandlers::will_focus

Handler which will be called right before an app will lose or gain focus.

Note
This will be called with in_focus set to true when a window which is covering the app is about to close and return focus to the app.
This will be called with in_focus set to false when a window which will cover the app is about to open, causing the app to lose focus.

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