pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • Examples
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

Pebble C API

  • Pebble C API
  • Pebble JavaScript API
  • PebbleKit JS
  • PebbleKit iOS
  • PebbleKit Android
  • Foundation
    • App
    • App Communication
    • App Glance
    • AppMessage
    • AppSync
    • AppWorker
    • DataLogging
    • DataStructures
      • UUID
    • Dictation
    • Dictionary
    • Event Service
      • AccelerometerService
      • AppFocusService
      • BatteryStateService
      • CompassService
      • ConnectionService
      • HealthService
      • TickTimerService
    • Exit Reason
    • Internationalization
    • Launch Reason
    • Logging
    • Math
    • Memory Management
    • Platform
    • Resources
      • File Formats
    • Rocky
    • Storage
    • Timer
    • Wakeup
    • Wall Time
    • WatchInfo
  • Graphics
    • Draw Commands
    • Drawing Paths
    • Drawing Primitives
    • Drawing Text
    • Fonts
    • Graphics Context
    • Graphics Types
      • Color Definitions
  • User Interface
    • Animation
      • PropertyAnimation
    • Clicks
    • Layers
      • ActionBarLayer
      • BitmapLayer
      • MenuLayer
      • RotBitmapLayer
      • ScrollLayer
      • SimpleMenuLayer
      • StatusBarLayer
      • TextLayer
    • Light
    • Preferences
    • UnobstructedArea
    • Vibes
    • Window
      • ActionMenu
      • NumberWindow
    • Window Stack
  • Standard C
    • Format
    • Locale
    • Math
    • Memory
    • String
    • Time

UnobstructedArea

Function Documentation

void unobstructed_area_service_subscribe(UnobstructedAreaHandlers handlers, void * context)

Subscribe to be notified when the app's unobstructed area changes. When an unobstructed area begins changing, the will_change handler will be called, and every will_change call is always paired with a did_change call that occurs when it is done changing given that the will_change and did_change handlers are set. When subscribing while the unobstructed area is changing, the will_change handler will be called after subscription in the next event loop.

Parameters

handlers

The handlers that should be called when the unobstructed area changes.

context

A user-provided context that will be passed to the callback handlers.

See Also

layer_get_unobstructed_bounds
void unobstructed_area_service_unsubscribe(void)

Unsubscribe from notifications about changes to the app's unobstructed area.

Data Structure Documentation

struct UnobstructedAreaHandlers

Data Fields

UnobstructedAreaWillChangeHandler will_change

Handler that will be called just before the unobstructed area will begin changing.

UnobstructedAreaChangeHandler change

Handler that will be called every time the unobstructed area changes.

UnobstructedAreaDidChangeHandler did_change

Handler that will be called after the unobstructed area has finished changing.

Typedef Documentation

typedef void(* UnobstructedAreaWillChangeHandler)(GRect final_unobstructed_screen_area, void *context)

Handler that will be called just before the unobstructed area will begin changing.

Parameters

final_unobstructed_screen_area

The final unobstructed screen area after the unobstructed area has finished changing.

context

A user-provided context.

typedef void(* UnobstructedAreaChangeHandler)(AnimationProgress progress, void *context)

Handler that will be called every time the unobstructed area changes.

Parameters

progress

The progress of the animation changing the unobstructed area.

context

A user-provided context.

typedef void(* UnobstructedAreaDidChangeHandler)(void *context)

Handler that will be called after the unobstructed area has finished changing.

Parameters

context

A user-provided context.

Need some help?

Functions

  • unobstructed_area_service_subscribe
  • unobstructed_area_service_unsubscribe

Data Structures

  • UnobstructedAreaHandlers

Typedefs

  • UnobstructedAreaWillChangeHandler
  • UnobstructedAreaChangeHandler
  • UnobstructedAreaDidChangeHandler

Getting Help

Do you have questions about the Pebble SDK?

Do you need some help understanding something on this page?

You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can send us a message through the website!