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
    • Storage
    • Timer
    • Wakeup
    • Wall Time
    • WatchInfo
    • Rocky
  • 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

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.

Macro Definition Documentation

  • SDK 3
  • SDK 4
#define unobstructed_area_service_subscribe ( handlers, 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
#define 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
  • SDK 3
  • SDK 4
#define unobstructed_area_service_unsubscribe ()

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

#define void unobstructed_area_service_unsubscribe (void)

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

Need some help?

Data Structures

  • UnobstructedAreaHandlers

Typedefs

  • UnobstructedAreaWillChangeHandler
  • UnobstructedAreaChangeHandler
  • UnobstructedAreaDidChangeHandler

Macro Defintions

  • unobstructed_area_service_subscribe
  • unobstructed_area_service_unsubscribe

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!