Pebble Foundation Classes  0.2.0
C++ for Pebble
pebble.h
1 #pragma once
2 
3 #include "pebble_fonts.h"
4 //#include "message_keys.auto.h"
5 //#include "src/resource_ids.auto.h"
6 
7 #define PBL_APP_INFO(...) _Pragma("message \"\n\n \
8  *** PBL_APP_INFO has been replaced with appinfo.json\n \
9  Try updating your project with `pebble convert-project`\n \
10  Visit our developer guides to learn more about appinfo.json:\n \
11  http://developer.getpebble.com/guides/pebble-apps/\n \""); \
12  _Pragma("GCC error \"PBL_APP_INFO has been replaced with appinfo.json\"");
13 
14 #define PBL_APP_INFO_SIMPLE PBL_APP_INFO
15 // #define _REENT_ONLY
16 
17 #include <locale.h>
18 #include <stdlib.h>
19 #include <stdint.h>
20 #include <stdio.h>
21 #include <stdbool.h>
22 #include <string.h>
23 //#include <time.h>
24 
25 
26 #include "pebble_warn_unsupported_functions.h"
27 #include "pebble_sdk_version.h"
28 
29 #ifndef __FILE_NAME__
30 #define __FILE_NAME__ __FILE__
31 #endif
32 
36 #define ARRAY_LENGTH(array) (sizeof((array))/sizeof((array)[0]))
37 
38 struct tm;
39 typedef struct tm tm;
40 
44 #define IS_SIGNED(var) (__builtin_choose_expr( \
45  __builtin_types_compatible_p(__typeof__(var), unsigned char), false, \
46  __builtin_choose_expr( \
47  __builtin_types_compatible_p(__typeof__(var), unsigned short), false, \
48  __builtin_choose_expr( \
49  __builtin_types_compatible_p(__typeof__(var), unsigned int), false, \
50  __builtin_choose_expr( \
51  __builtin_types_compatible_p(__typeof__(var), unsigned long), false, \
52  __builtin_choose_expr( \
53  __builtin_types_compatible_p(__typeof__(var), unsigned long long), false, true))))) \
54 )
55 
58 
157 
160 typedef enum {
171 } ButtonId;
172 
174 
176 
179 
182 
184 
189 
194 const char *i18n_get_system_locale(void);
195 
197 
204 
206 typedef enum {
217 
218  WATCH_INFO_MODEL__MAX
220 
222 typedef enum {
229 
232 
236 
240 
244 
250 
256 
259 
263 
264  WATCH_INFO_COLOR__MAX
266 
270 typedef struct {
271  uint8_t major;
272  uint8_t minor;
273  uint8_t patch;
275 
279 
283 
284 WatchInfoColor watch_info_get_color(void);
285 
287 
290 
293 #define TRIG_MAX_RATIO 0xffff
294 
298 #define TRIG_MAX_ANGLE 0x10000
299 
303 #define TRIGANGLE_TO_DEG(trig_angle) (((trig_angle) * 360) / TRIG_MAX_ANGLE)
304 
308 #define DEG_TO_TRIGANGLE(angle) (((angle) * TRIG_MAX_ANGLE) / 360)
309 
313 int32_t sin_lookup(int32_t angle);
314 
319 int32_t cos_lookup(int32_t angle);
320 
323 int32_t atan2_lookup(int16_t y, int16_t x);
324 
326 
333 
335 typedef enum {
336  TODAY = 0,
344 } WeekDay;
345 
352 void clock_copy_time_string(char *buffer, uint8_t size);
353 
357 bool clock_is_24h_style(void);
358 
368 time_t clock_to_timestamp(WeekDay day, int hour, int minute);
369 
372 bool clock_is_timezone_set(void);
373 
375 #define TIMEZONE_NAME_LENGTH 32
376 
382 void clock_get_timezone(char *timezone, const size_t buffer_size);
383 
385 
388 
389 typedef enum PlatformType {
390  PlatformTypeAplite,
391  PlatformTypeBasalt,
392  PlatformTypeChalk,
393  PlatformTypeDiorite,
394  PlatformTypeEmery,
395 } PlatformType;
396 
397 #define PBL_PLATFORM_TYPE_CURRENT PlatformTypeBasalt
398 
399 #define PBL_PLATFORM_SWITCH_DEFAULT(PLAT, DEFAULT, APLITE, BASALT, CHALK, DIORITE, EMERY) (\
400  ((PLAT) == PlatformTypeEmery) ? (EMERY) : \
401  ((PLAT) == PlatformTypeDiorite) ? (DIORITE) : \
402  ((PLAT) == PlatformTypeChalk) ? (CHALK) : \
403  ((PLAT) == PlatformTypeBasalt) ? (BASALT) : \
404  ((PLAT) == PlatformTypeBasalt) ? (APLITE) : \
405  (DEFAULT) \
406 )
407 
408 #define PBL_PLATFORM_SWITCH(PLAT, APLITE, BASALT, CHALK, DIORITE, EMERY) \
409  PBL_PLATFORM_SWITCH_DEFAULT(PLAT, APLITE, APLITE, BASALT, CHALK, DIORITE, EMERY)
410 
412 
415 
442 
443 typedef void (*ConnectionHandler)(bool connected);
444 
445 typedef struct {
449  ConnectionHandler pebble_app_connection_handler;
451  ConnectionHandler pebblekit_connection_handler;
453 
457 
461 
469 
473 
475 
489 
492 typedef void (*AppFocusHandler)(bool in_focus);
493 
506 typedef struct {
521 
527 
541 
545 
547 
560 
562 typedef struct {
564  uint8_t charge_percent;
570 
573 typedef void (*BatteryStateHandler)(BatteryChargeState charge);
574 
579 
583 
587 
589 
602 
605 typedef struct __attribute__((__packed__)) AccelData {
607  int16_t x;
609  int16_t y;
611  int16_t z;
612 
614  bool did_vibrate;
615 
617  uint64_t timestamp;
618 } AccelData;
619 
621 typedef struct __attribute__((__packed__)) {
623  int16_t x;
625  int16_t y;
627  int16_t z;
628 } AccelRawData;
629 
631 typedef enum {
641 } AccelAxisType;
642 
646 typedef void (*AccelDataHandler)(AccelData *data, uint32_t num_samples);
647 
652 typedef void (*AccelRawDataHandler)(AccelRawData *data, uint32_t num_samples, uint64_t timestamp);
653 
657 typedef void (*AccelTapHandler)(AccelAxisType axis, int32_t direction);
658 
660 typedef enum {
670 
676 int accel_service_peek(AccelData *data);
677 
681 
684 int accel_service_set_samples_per_update(uint32_t num_samples);
685 
691 void accel_data_service_subscribe(uint32_t samples_per_update, AccelDataHandler handler);
692 
696 
701 
705 
711 void accel_raw_data_service_subscribe(uint32_t samples_per_update, AccelRawDataHandler handler);
712 
714 
736 
738 typedef enum {
748 } CompassStatus;
749 
755 typedef int32_t CompassHeading;
756 
758 typedef struct {
770 
773 typedef void (*CompassHeadingHandler)(CompassHeadingData heading);
774 
784 
792 
796 void compass_service_unsubscribe(void);
797 
802 
804 
812 
815 typedef enum {
817  SECOND_UNIT = 1 << 0,
819  MINUTE_UNIT = 1 << 1,
821  HOUR_UNIT = 1 << 2,
823  DAY_UNIT = 1 << 3,
825  MONTH_UNIT = 1 << 4,
827  YEAR_UNIT = 1 << 5
828 } TimeUnits;
829 
833 typedef void (*TickHandler)(struct tm *tick_time, TimeUnits units_changed);
834 
841 void tick_timer_service_subscribe(TimeUnits tick_units, TickHandler handler);
842 
846 
848 
856 
859 typedef enum {
878 } HealthMetric;
879 
881 typedef int32_t HealthValue;
882 
886 
895 HealthValue health_service_sum(HealthMetric metric, time_t time_start, time_t time_end);
896 
901 
911 
913 typedef enum {
925 
951 HealthValue health_service_sum_averaged(HealthMetric metric, time_t time_start, time_t time_end,
952  HealthServiceTimeScope scope);
953 
956 typedef enum {
971 
1011  time_t time_end, HealthAggregation aggregation,
1012  HealthServiceTimeScope scope);
1013 
1015 typedef uint32_t HealthActivityMask;
1016 
1018 #define HealthActivityMaskAll ((HealthActivityOpenWorkout << 1) - 1)
1019 
1021 typedef enum {
1034 } HealthActivity;
1035 
1040 
1048 typedef bool (*HealthActivityIteratorCB)(HealthActivity activity, time_t time_start,
1049  time_t time_end, void *context);
1050 
1056 typedef enum {
1062 
1073 void health_service_activities_iterate(HealthActivityMask activity_mask, time_t time_start,
1074  time_t time_end, HealthIterationDirection direction,
1075  HealthActivityIteratorCB callback, void *context);
1076 
1081 typedef enum {
1092 
1107  HealthMetric metric, time_t time_start, time_t time_end);
1108 
1124  HealthMetric metric, time_t time_start, time_t time_end, HealthServiceTimeScope scope);
1125 
1138  HealthMetric metric, time_t time_start, time_t time_end, HealthAggregation aggregation,
1139  HealthServiceTimeScope scope);
1140 
1151  HealthActivityMask activity_mask, time_t time_start, time_t time_end);
1152 
1154 typedef enum {
1169 } HealthEventType;
1170 
1175 typedef void (*HealthEventHandler)(HealthEventType event, void *context);
1176 
1184 bool health_service_events_subscribe(HealthEventHandler handler, void *context);
1185 
1189 
1210 bool health_service_set_heart_rate_sample_period(uint16_t interval_sec);
1211 
1218 
1237 
1243 
1245 typedef enum AmbientLightLevel {
1246  AmbientLightLevelUnknown = 0,
1247  AmbientLightLevelVeryDark,
1248  AmbientLightLevelDark,
1249  AmbientLightLevelLight,
1250  AmbientLightLevelVeryLight,
1252 
1260 typedef struct {
1261  uint8_t steps;
1262  uint8_t orientation;
1263  uint16_t vmc;
1264  bool is_invalid: 1;
1265  AmbientLightLevel light: 3;
1267  uint8_t padding: 4;
1268  uint8_t heart_rate_bpm;
1269  uint8_t reserved[6];
1271 
1291 uint32_t health_service_get_minute_history(HealthMinuteData *minute_data, uint32_t max_records,
1292  time_t *time_start, time_t *time_end);
1293 
1296 #define PBL_IF_HEALTH_ELSE(if_true, if_false) (if_true)
1297 
1299 typedef enum {
1307 
1313 
1315 
1317 
1360 
1361 typedef void *DataLoggingSessionRef;
1362 
1365 typedef enum {
1375 
1377 typedef enum {
1386 
1396 DataLoggingSessionRef data_logging_create(uint32_t tag, DataLoggingItemType item_type,
1397  uint16_t item_length, bool resume);
1398 
1405 void data_logging_finish(DataLoggingSessionRef logging_session);
1406 
1429 DataLoggingResult data_logging_log(DataLoggingSessionRef logging_session, const void *data,
1430  uint32_t num_items);
1431 
1433 
1436 
1439 
1440 typedef struct __attribute__((__packed__)) {
1441  uint8_t byte0;
1442  uint8_t byte1;
1443  uint8_t byte2;
1444  uint8_t byte3;
1445  uint8_t byte4;
1446  uint8_t byte5;
1447  uint8_t byte6;
1448  uint8_t byte7;
1449  uint8_t byte8;
1450  uint8_t byte9;
1451  uint8_t byte10;
1452  uint8_t byte11;
1453  uint8_t byte12;
1454  uint8_t byte13;
1455  uint8_t byte14;
1456  uint8_t byte15;
1457 } Uuid;
1458 
1459 #define UUID_SIZE 16
1460 
1463 #define UuidMake(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) ((Uuid) {p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15})
1464 
1467 #define UuidMakeFromBEBytes(b) ((Uuid) { b[0], b[1], b[2], b[3], \
1468  b[4], b[5], b[6], b[7], \
1469  b[8], b[9], b[10], b[11], \
1470  b[12], b[13], b[14], b[15] })
1471 
1474 #define UuidMakeFromLEBytes(b) ((Uuid) { b[15], b[14], b[13], b[12], \
1475  b[11], b[10], b[9], b[8], \
1476  b[7], b[6], b[5], b[4], \
1477  b[3], b[2], b[1], b[0] })
1478 
1481 bool uuid_equal(const Uuid *uu1, const Uuid *uu2);
1482 
1487 void uuid_to_string(const Uuid *uuid, char *buffer);
1488 
1490 #define UUID_STRING_BUFFER_LENGTH (32 + 4 + 2 + 1)
1491 
1493 
1495 
1507 
1508 void app_log(uint8_t log_level, const char* src_filename, int src_line_number, const char* fmt,
1509  ...);
1510 
1515 #define APP_LOG(level, fmt, args...) \
1516  app_log(level, __FILE_NAME__, __LINE__, fmt, ## args)
1517 
1519 typedef enum {
1530 } AppLogLevel;
1531 
1533 
1625 
1627 typedef enum {
1629  DICT_OK = 0,
1640 
1642 typedef enum {
1653 } TupleType;
1654 
1658 typedef struct __attribute__((__packed__)) {
1660  uint32_t key;
1662  TupleType type:8;
1664  uint16_t length;
1671  union {
1673  uint8_t data[0];
1675  char cstring[0];
1678  uint8_t uint8;
1681  uint16_t uint16;
1684  uint32_t uint32;
1687  int8_t int8;
1690  int16_t int16;
1693  int32_t int32;
1694  } value[];
1695 } Tuple;
1696 
1697 struct Dictionary;
1698 typedef struct Dictionary Dictionary;
1699 
1705 typedef struct {
1706  Dictionary *dictionary;
1707  const void *end;
1708  Tuple *cursor;
1714 
1726 uint32_t dict_calc_buffer_size(const uint8_t tuple_count, ...);
1727 
1733 uint32_t dict_size(DictionaryIterator* iter);
1734 
1743 DictionaryResult dict_write_begin(DictionaryIterator *iter, uint8_t * const buffer, const uint16_t size);
1744 
1753 DictionaryResult dict_write_data(DictionaryIterator *iter, const uint32_t key, const uint8_t * const data, const uint16_t size);
1754 
1762 DictionaryResult dict_write_cstring(DictionaryIterator *iter, const uint32_t key, const char * const cstring);
1763 
1773 DictionaryResult dict_write_int(DictionaryIterator *iter, const uint32_t key, const void *integer, const uint8_t width_bytes, const bool is_signed);
1774 
1785 DictionaryResult dict_write_uint8(DictionaryIterator *iter, const uint32_t key, const uint8_t value);
1786 
1787 DictionaryResult dict_write_uint16(DictionaryIterator *iter, const uint32_t key, const uint16_t value);
1788 
1789 DictionaryResult dict_write_uint32(DictionaryIterator *iter, const uint32_t key, const uint32_t value);
1790 
1791 DictionaryResult dict_write_int8(DictionaryIterator *iter, const uint32_t key, const int8_t value);
1792 
1793 DictionaryResult dict_write_int16(DictionaryIterator *iter, const uint32_t key, const int16_t value);
1794 
1795 DictionaryResult dict_write_int32(DictionaryIterator *iter, const uint32_t key, const int32_t value);
1796 
1801 uint32_t dict_write_end(DictionaryIterator *iter);
1802 
1809 Tuple * dict_read_begin_from_buffer(DictionaryIterator *iter, const uint8_t * const buffer, const uint16_t size);
1810 
1814 Tuple * dict_read_next(DictionaryIterator *iter);
1815 
1819 Tuple * dict_read_first(DictionaryIterator *iter);
1820 
1827 typedef struct Tuplet {
1832  uint32_t key;
1836  union {
1838  struct {
1840  const uint8_t *data;
1842  const uint16_t length;
1843  } bytes;
1845  struct {
1847  const char *data;
1849  const uint16_t length;
1850  } cstring;
1852  struct {
1855  uint32_t storage;
1857  const uint16_t width;
1858  } integer;
1859  };
1860 } Tuplet;
1861 
1866 #define TupletBytes(_key, _data, _length) \
1867 ((const Tuplet) { .type = TUPLE_BYTE_ARRAY, .key = _key, .bytes = { .data = _data, .length = _length }})
1868 
1872 #define TupletCString(_key, _cstring) \
1873 ((const Tuplet) { .type = TUPLE_CSTRING, .key = _key, .cstring = { .data = _cstring, .length = _cstring ? strlen(_cstring) + 1 : 0 }})
1874 
1878 #define TupletInteger(_key, _integer) \
1879 ((const Tuplet) { .type = IS_SIGNED(_integer) ? TUPLE_INT : TUPLE_UINT, .key = _key, .integer = { .storage = _integer, .width = sizeof(_integer) }})
1880 
1886 typedef void (*DictionarySerializeCallback)(const uint8_t * const data, const uint16_t size, void *context);
1887 
1897 DictionaryResult dict_serialize_tuplets(DictionarySerializeCallback callback, void *context, const Tuplet * const tuplets, const uint8_t tuplets_count);
1898 
1907 DictionaryResult dict_serialize_tuplets_to_buffer(const Tuplet * const tuplets, const uint8_t tuplets_count, uint8_t *buffer, uint32_t *size_in_out);
1908 
1917 DictionaryResult dict_serialize_tuplets_to_buffer_with_iter(DictionaryIterator *iter, const Tuplet * const tuplets, const uint8_t tuplets_count, uint8_t *buffer, uint32_t *size_in_out);
1918 
1923 DictionaryResult dict_write_tuplet(DictionaryIterator *iter, const Tuplet * const tuplet);
1924 
1932 uint32_t dict_calc_buffer_size_from_tuplets(const Tuplet * const tuplets, const uint8_t tuplets_count);
1933 
1947 typedef void (*DictionaryKeyUpdatedCallback)(const uint32_t key, const Tuple *new_tuple, const Tuple *old_tuple, void *context);
1948 
1959 DictionaryResult dict_merge(DictionaryIterator *dest, uint32_t *dest_max_size_in_out,
1960  DictionaryIterator *source,
1961  const bool update_existing_keys_only,
1962  const DictionaryKeyUpdatedCallback key_callback, void *context);
1963 
1968 Tuple *dict_find(const DictionaryIterator *iter, const uint32_t key);
1969 
1971 
1974 
1975 typedef struct DictationSession DictationSession;
1976 
1977 typedef enum {
1980 
1983 
1986 
1989 
1992 
1995 
1998 
2001 
2005 
2014 typedef void (*DictationSessionStatusCallback)(DictationSession *session,
2015  DictationSessionStatus status, char *transcription,
2016  void *context);
2017 
2032 DictationSession *dictation_session_create(uint32_t buffer_size,
2034  void *callback_context);
2035 
2038 void dictation_session_destroy(DictationSession *session);
2039 
2046 DictationSessionStatus dictation_session_start(DictationSession *session);
2047 
2052 DictationSessionStatus dictation_session_stop(DictationSession *session);
2053 
2059 void dictation_session_enable_confirmation(DictationSession *session, bool is_enabled);
2060 
2065 void dictation_session_enable_error_dialogs(DictationSession *session, bool is_enabled);
2066 
2069 #define PBL_IF_MICROPHONE_ELSE(if_true, if_false) (if_true)
2070 
2072 
2160 
2162 typedef enum {
2165 
2168 
2171 
2174 
2177 
2180 
2183  APP_MSG_BUSY = 1 << 6,
2184 
2187 
2190 
2193 
2196 
2200 
2202  APP_MSG_CLOSED = 1 << 13,
2203 
2206 
2210 
2224 AppMessageResult app_message_open(const uint32_t size_inbound, const uint32_t size_outbound);
2225 
2229 
2241 typedef void (*AppMessageInboxReceived)(DictionaryIterator *iterator, void *context);
2242 
2255 typedef void (*AppMessageInboxDropped)(AppMessageResult reason, void *context);
2256 
2267 typedef void (*AppMessageOutboxSent)(DictionaryIterator *iterator, void *context);
2268 
2287 typedef void (*AppMessageOutboxFailed)(DictionaryIterator *iterator, AppMessageResult reason, void *context);
2288 
2293 void *app_message_get_context(void);
2294 
2301 void *app_message_set_context(void *context);
2302 
2314 
2326 
2339 
2352 
2360 uint32_t app_message_inbox_size_maximum(void);
2361 
2369 uint32_t app_message_outbox_size_maximum(void);
2370 
2384 
2395 
2401 #define APP_MESSAGE_INBOX_SIZE_MINIMUM 124
2402 
2408 #define APP_MESSAGE_OUTBOX_SIZE_MINIMUM 636
2409 
2411 
2441 
2464 typedef void (*AppSyncTupleChangedCallback)(const uint32_t key, const Tuple *new_tuple,
2465  const Tuple *old_tuple, void *context);
2466 
2475 typedef void (*AppSyncErrorCallback)(DictionaryResult dict_error,
2476  AppMessageResult app_message_error, void *context);
2477 
2478 typedef struct AppSync {
2479  DictionaryIterator current_iter;
2480  union {
2481  Dictionary *current;
2482  uint8_t *buffer;
2483  };
2484  uint16_t buffer_size;
2485  struct {
2486  AppSyncTupleChangedCallback value_changed;
2487  AppSyncErrorCallback error;
2488  void *context;
2489  } callback;
2490 } AppSync;
2491 
2512 void app_sync_init(struct AppSync *s, uint8_t *buffer, const uint16_t buffer_size,
2513  const Tuplet * const keys_and_initial_values, const uint8_t count,
2514  AppSyncTupleChangedCallback tuple_changed_callback,
2515  AppSyncErrorCallback error_callback, void *context);
2516 
2521 void app_sync_deinit(struct AppSync *s);
2522 
2536 AppMessageResult app_sync_set(struct AppSync *s, const Tuplet * const keys_and_values_to_update,
2537  const uint8_t count);
2538 
2544 const Tuple * app_sync_get(const struct AppSync *s, const uint32_t key);
2545 
2547 
2563 
2566 
2604 
2606 
2665 
2667 
2669 
2672 typedef void * ResHandle;
2673 
2674 #define RESOURCE_ID_FONT_FALLBACK RESOURCE_ID_GOTHIC_14
2675 
2701 ResHandle resource_get_handle(uint32_t resource_id);
2702 
2706 size_t resource_size(ResHandle h);
2707 
2713 size_t resource_load(ResHandle h, uint8_t *buffer, size_t max_length);
2714 
2722  ResHandle h, uint32_t start_offset, uint8_t *buffer, size_t num_bytes);
2723 
2725 
2728 
2731 void app_event_loop(void);
2732 
2734 
2738 
2740 typedef enum {
2753 } AppWorkerResult;
2754 
2756 typedef struct {
2757  uint16_t data0;
2758  uint16_t data1;
2759  uint16_t data2;
2761 
2764 bool app_worker_is_running(void);
2765 
2770 
2775 
2779 typedef void (*AppWorkerMessageHandler)(uint16_t type, AppWorkerMessage *data);
2780 
2786 
2790 
2794 void app_worker_send_message(uint8_t type, AppWorkerMessage *data);
2795 
2797 
2804 
2817 typedef enum {
2824 } SniffInterval;
2825 
2830 void app_comm_set_sniff_interval(const SniffInterval interval);
2831 
2835 
2837 
2841 
2844 void psleep(int millis);
2845 
2846 struct AppTimer;
2847 typedef struct AppTimer AppTimer;
2848 
2851 typedef void (*AppTimerCallback)(void* data);
2852 
2858 AppTimer* app_timer_register(uint32_t timeout_ms, AppTimerCallback callback, void* callback_data);
2859 
2864 bool app_timer_reschedule(AppTimer *timer_handle, uint32_t new_timeout_ms);
2865 
2868 void app_timer_cancel(AppTimer *timer_handle);
2869 
2871 
2876 
2879 size_t heap_bytes_free(void);
2880 
2883 size_t heap_bytes_used(void);
2884 
2892 void memory_cache_flush(void *start, size_t size);
2893 
2895 
2918 
2920 #define PERSIST_DATA_MAX_LENGTH 256
2921 
2923 #define PERSIST_STRING_MAX_LENGTH PERSIST_DATA_MAX_LENGTH
2924 
2926 typedef enum StatusCode {
2929 
2931  E_ERROR = -1,
2932 
2935 
2938 
2941 
2944 
2947 
2950 
2952  E_RANGE = -8,
2953 
2956 
2959 
2961  E_BUSY = -11,
2962 
2964  E_AGAIN = -12,
2965 
2967  S_TRUE = 1,
2968 
2970  S_FALSE = 0,
2971 
2974 
2977 
2978 } StatusCode;
2979 
2981 typedef int32_t status_t;
2982 
2986 bool persist_exists(const uint32_t key);
2987 
2992 int persist_get_size(const uint32_t key);
2993 
2998 bool persist_read_bool(const uint32_t key);
2999 
3005 int32_t persist_read_int(const uint32_t key);
3006 
3014 int persist_read_data(const uint32_t key, void *buffer, const size_t buffer_size);
3015 
3024 int persist_read_string(const uint32_t key, char *buffer, const size_t buffer_size);
3025 
3030 status_t persist_write_bool(const uint32_t key, const bool value);
3031 
3037 status_t persist_write_int(const uint32_t key, const int32_t value);
3038 
3045 int persist_write_data(const uint32_t key, const void *data, const size_t size);
3046 
3052 int persist_write_string(const uint32_t key, const char *cstring);
3053 
3056 status_t persist_delete(const uint32_t key);
3057 
3059 
3063 
3065 typedef int32_t WakeupId;
3066 
3070 typedef void (*WakeupHandler)(WakeupId wakeup_id, int32_t cookie);
3071 
3075 
3089 WakeupId wakeup_schedule(time_t timestamp, int32_t cookie, bool notify_if_missed);
3090 
3093 void wakeup_cancel(WakeupId wakeup_id);
3094 
3096 void wakeup_cancel_all(void);
3097 
3104 bool wakeup_get_launch_event(WakeupId *wakeup_id, int32_t *cookie);
3105 
3115 bool wakeup_query(WakeupId wakeup_id, time_t *timestamp);
3116 
3118 
3128 
3133 typedef enum {
3142 } AppLaunchReason;
3143 
3147 
3152 uint32_t launch_get_args(void);
3153 
3155 
3165 
3168 typedef enum AppExitReason {
3171 
3173 } AppExitReason;
3174 
3177 void exit_reason_set(AppExitReason exit_reason);
3178 
3180 
3185 
3187 typedef uint32_t PublishedId;
3188 
3190 #define APP_GLANCE_SLICE_NO_EXPIRATION ((time_t)0)
3191 
3194 #define APP_GLANCE_SLICE_DEFAULT_ICON ((PublishedId)0)
3195 
3199 typedef struct AppGlanceSlice {
3201  struct {
3208  } layout;
3212 } AppGlanceSlice;
3213 
3215 typedef enum AppGlanceResult {
3230 } AppGlanceResult;
3231 
3232 struct AppGlanceReloadSession;
3233 typedef struct AppGlanceReloadSession AppGlanceReloadSession;
3234 
3240 AppGlanceResult app_glance_add_slice(AppGlanceReloadSession *session, AppGlanceSlice slice);
3241 
3247 typedef void (*AppGlanceReloadCallback)(AppGlanceReloadSession *session, size_t limit,
3248  void *context);
3249 
3254 void app_glance_reload(AppGlanceReloadCallback callback, void *context);
3255 
3257 
3259 
3262 
3267 
3268 typedef union GColor8 {
3269  uint8_t argb;
3270  struct {
3271  uint8_t b:2;
3272  uint8_t g:2;
3273  uint8_t r:2;
3274  uint8_t a:2;
3275  };
3276 } GColor8;
3277 
3278 typedef GColor8 GColor;
3279 
3280 #include "gcolor_definitions.h"
3281 
3283 bool gcolor_equal(GColor8 x, GColor8 y);
3284 
3290 GColor8 gcolor_legible_over(GColor8 background_color);
3291 
3294 #define COLOR_FALLBACK(color, bw) (color)
3295 
3298 #define PBL_IF_RECT_ELSE(if_true, if_false) (if_true)
3299 
3302 #define PBL_IF_ROUND_ELSE(if_true, if_false) (if_false)
3303 
3306 #define PBL_IF_BW_ELSE(if_true, if_false) (if_false)
3307 
3310 #define PBL_IF_COLOR_ELSE(if_true, if_false) (if_true)
3311 
3316 typedef struct GPoint {
3318  int16_t x;
3320  int16_t y;
3321 } GPoint;
3322 
3324 #define GPoint(x, y) ((GPoint){(x), (y)})
3325 
3327 #define GPointZero GPoint(0, 0)
3328 
3333 bool gpoint_equal(const GPoint * const point_a, const GPoint * const point_b);
3334 
3336 typedef struct GSize {
3338  int16_t w;
3340  int16_t h;
3341 } GSize;
3342 
3344 #define GSize(w, h) ((GSize){(w), (h)})
3345 
3347 #define GSizeZero GSize(0, 0)
3348 
3353 bool gsize_equal(const GSize *size_a, const GSize *size_b);
3354 
3357 typedef struct GRect {
3362 } GRect;
3363 
3365 #define GRect(x, y, w, h) ((GRect){{(x), (y)}, {(w), (h)}})
3366 
3368 #define GRectZero GRect(0, 0, 0, 0)
3369 
3374 bool grect_equal(const GRect* const rect_a, const GRect* const rect_b);
3375 
3381 bool grect_is_empty(const GRect* const rect);
3382 
3390 void grect_standardize(GRect *rect);
3391 
3397 void grect_clip(GRect * const rect_to_clip, const GRect * const rect_clipper);
3398 
3403 bool grect_contains_point(const GRect *rect, const GPoint *point);
3404 
3409 GPoint grect_center_point(const GRect *rect);
3410 
3419 GRect grect_crop(GRect rect, const int32_t crop_size_px);
3420 
3422 #define PLAY_COUNT_INFINITE UINT32_MAX
3423 
3425 #define PLAY_DURATION_INFINITE UINT32_MAX
3426 
3428 typedef enum GBitmapFormat {
3429  GBitmapFormat1Bit = 0, //<! 1-bit black and white. 0 = black, 1 = white.
3430  GBitmapFormat8Bit, //<! 6-bit color + 2 bit alpha channel. See \ref GColor8 for pixel format.
3431  GBitmapFormat1BitPalette,
3432  GBitmapFormat2BitPalette,
3433  GBitmapFormat4BitPalette,
3434  GBitmapFormat8BitCircular,
3435 } GBitmapFormat;
3436 
3437 struct GBitmap;
3438 typedef struct GBitmap GBitmap;
3439 
3440 struct GBitmapSequence;
3441 typedef struct GBitmapSequence GBitmapSequence;
3442 
3452 uint16_t gbitmap_get_bytes_per_row(const GBitmap *bitmap);
3453 
3457 GBitmapFormat gbitmap_get_format(const GBitmap *bitmap);
3458 
3465 uint8_t* gbitmap_get_data(const GBitmap *bitmap);
3466 
3476 void gbitmap_set_data(GBitmap *bitmap, uint8_t *data, GBitmapFormat format,
3477  uint16_t row_size_bytes, bool free_on_destroy);
3478 
3484 GRect gbitmap_get_bounds(const GBitmap *bitmap);
3485 
3490 void gbitmap_set_bounds(GBitmap *bitmap, GRect bounds);
3491 
3496 GColor* gbitmap_get_palette(const GBitmap *bitmap);
3497 
3507 void gbitmap_set_palette(GBitmap *bitmap, GColor *palette, bool free_on_destroy);
3508 
3514 GBitmap* gbitmap_create_with_resource(uint32_t resource_id);
3515 
3529 GBitmap* gbitmap_create_with_data(const uint8_t *data);
3530 
3545 GBitmap* gbitmap_create_as_sub_bitmap(const GBitmap *base_bitmap, GRect sub_rect);
3546 
3555 GBitmap* gbitmap_create_from_png_data(const uint8_t *png_data, size_t png_data_size);
3556 
3565 GBitmap* gbitmap_create_blank(GSize size, GBitmapFormat format);
3566 
3581  GColor *palette, bool free_on_destroy);
3582 
3590 GBitmap* gbitmap_create_palettized_from_1bit(const GBitmap *src_bitmap);
3591 
3600 void gbitmap_destroy(GBitmap* bitmap);
3601 
3605 GBitmapSequence *gbitmap_sequence_create_with_resource(uint32_t resource_id);
3606 
3617 bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence,
3618  GBitmap *bitmap, uint32_t *delay_ms);
3619 
3634 bool gbitmap_sequence_update_bitmap_by_elapsed(GBitmapSequence *bitmap_sequence,
3635  GBitmap *bitmap, uint32_t elapsed_ms);
3636 
3639 void gbitmap_sequence_destroy(GBitmapSequence *bitmap_sequence);
3640 
3644 bool gbitmap_sequence_restart(GBitmapSequence *bitmap_sequence);
3645 
3649 int32_t gbitmap_sequence_get_current_frame_idx(GBitmapSequence *bitmap_sequence);
3650 
3654 uint32_t gbitmap_sequence_get_total_num_frames(GBitmapSequence *bitmap_sequence);
3655 
3661 uint32_t gbitmap_sequence_get_play_count(GBitmapSequence *bitmap_sequence);
3662 
3668 void gbitmap_sequence_set_play_count(GBitmapSequence *bitmap_sequence, uint32_t play_count);
3669 
3675 GSize gbitmap_sequence_get_bitmap_size(GBitmapSequence *bitmap_sequence);
3676 
3683 typedef struct {
3691  uint8_t *data;
3693  int16_t min_x;
3697  int16_t max_x;
3699 
3708 GBitmapDataRowInfo gbitmap_get_data_row_info(const GBitmap *bitmap, uint16_t y);
3709 
3713 typedef enum GAlign {
3732 } GAlign;
3733 
3744 void grect_align(GRect *rect, const GRect *inside_rect, const GAlign alignment, const bool clip);
3745 
3761 typedef enum {
3797 } GCompOp;
3798 
3799 struct GContext;
3800 typedef struct GContext GContext;
3801 
3804 typedef struct {
3806  int16_t top;
3808  int16_t right;
3810  int16_t bottom;
3812  int16_t left;
3813 } GEdgeInsets;
3814 
3816 #define GEdgeInsets4(t, r, b, l) \
3817  ((GEdgeInsets){.top = t, .right = r, .bottom = b, .left = l})
3818 
3820 #define GEdgeInsets3(t, rl, b) \
3821  ((GEdgeInsets){.top = t, .right = rl, .bottom = b, .left = rl})
3822 
3824 #define GEdgeInsets2(tb, rl) \
3825  ((GEdgeInsets){.top = tb, .right = rl, .bottom = tb, .left = rl})
3826 
3828 #define GEdgeInsets1(trbl) \
3829  ((GEdgeInsets){.top = trbl, .right = trbl, .bottom = trbl, .left = trbl})
3830 
3832 #define GEdgeInsetsN(_1, _2, _3, _4, NAME, ...) NAME
3833 
3845 #define GEdgeInsets(...) \
3846  GEdgeInsetsN(__VA_ARGS__, GEdgeInsets4, GEdgeInsets3, GEdgeInsets2, GEdgeInsets1)(__VA_ARGS__)
3847 
3860 GRect grect_inset(GRect rect, GEdgeInsets insets);
3861 
3863 
3889 
3893 void graphics_context_set_stroke_color(GContext* ctx, GColor color);
3894 
3898 void graphics_context_set_fill_color(GContext* ctx, GColor color);
3899 
3903 void graphics_context_set_text_color(GContext* ctx, GColor color);
3904 
3914 void graphics_context_set_compositing_mode(GContext* ctx, GCompOp mode);
3915 
3920 void graphics_context_set_antialiased(GContext* ctx, bool enable);
3921 
3929 void graphics_context_set_stroke_width(GContext* ctx, uint8_t stroke_width);
3930 
3932 
3950 
3955 typedef enum {
3959  GCornerTopLeft = 1 << 0,
3976 } GCornerMask;
3977 
3981 void graphics_draw_pixel(GContext* ctx, GPoint point);
3982 
3987 void graphics_draw_line(GContext* ctx, GPoint p0, GPoint p1);
3988 
3992 void graphics_draw_rect(GContext *ctx, GRect rect);
3993 
4001 void graphics_fill_rect(GContext *ctx, GRect rect, uint16_t corner_radius,
4002  GCornerMask corner_mask);
4003 
4008 void graphics_draw_circle(GContext* ctx, GPoint p, uint16_t radius);
4009 
4014 void graphics_fill_circle(GContext* ctx, GPoint p, uint16_t radius);
4015 
4020 void graphics_draw_round_rect(GContext *ctx, GRect rect, uint16_t radius);
4021 
4033 void graphics_draw_bitmap_in_rect(GContext *ctx, const GBitmap *bitmap, GRect rect);
4034 
4037 GBitmap* graphics_capture_frame_buffer(GContext* ctx);
4038 
4061 GBitmap *graphics_capture_frame_buffer_format(GContext *ctx, GBitmapFormat format);
4062 
4071 bool graphics_release_frame_buffer(GContext* ctx, GBitmap* buffer);
4072 
4078 bool graphics_frame_buffer_is_captured(GContext* ctx);
4079 
4091 void graphics_draw_rotated_bitmap(GContext* ctx, GBitmap *src, GPoint src_ic, int rotation,
4092  GPoint dest_ic);
4093 
4099 typedef enum {
4105 } GOvalScaleMode;
4106 
4117 void graphics_draw_arc(GContext *ctx, GRect rect, GOvalScaleMode scale_mode,
4118  int32_t angle_start, int32_t angle_end);
4119 
4136 void graphics_fill_radial(GContext *ctx, GRect rect, GOvalScaleMode scale_mode,
4137  uint16_t inset_thickness,
4138  int32_t angle_start, int32_t angle_end);
4139 
4147 GPoint gpoint_from_polar(GRect rect, GOvalScaleMode scale_mode, int32_t angle);
4148 
4161 GRect grect_centered_from_polar(GRect rect, GOvalScaleMode scale_mode, int32_t angle, GSize size);
4162 
4164 
4201 
4206 
4212 
4216 
4219 
4225 typedef bool (*GDrawCommandListIteratorCb)(GDrawCommand *command, uint32_t index, void *context);
4226 
4231 
4232 typedef enum {
4238 
4242 void gdraw_command_draw(GContext *ctx, GDrawCommand *command);
4243 
4248 
4252 void gdraw_command_set_fill_color(GDrawCommand *command, GColor fill_color);
4253 
4258 
4262 void gdraw_command_set_stroke_color(GDrawCommand *command, GColor stroke_color);
4263 
4268 
4272 void gdraw_command_set_stroke_width(GDrawCommand *command, uint8_t stroke_width);
4273 
4278 
4280 uint16_t gdraw_command_get_num_points(GDrawCommand *command);
4281 
4286 void gdraw_command_set_point(GDrawCommand *command, uint16_t point_idx, GPoint point);
4287 
4293 GPoint gdraw_command_get_point(GDrawCommand *command, uint16_t point_idx);
4294 
4299 void gdraw_command_set_radius(GDrawCommand *command, uint16_t radius);
4300 
4305 uint16_t gdraw_command_get_radius(GDrawCommand *command);
4306 
4312 void gdraw_command_set_path_open(GDrawCommand *command, bool path_open);
4313 
4320 
4325 void gdraw_command_set_hidden(GDrawCommand *command, bool hidden);
4326 
4330 bool gdraw_command_get_hidden(GDrawCommand *command);
4331 
4337 void gdraw_command_frame_draw(GContext *ctx, GDrawCommandSequence *sequence,
4338  GDrawCommandFrame *frame, GPoint offset);
4339 
4343 void gdraw_command_frame_set_duration(GDrawCommandFrame *frame, uint32_t duration);
4344 
4349 
4354 
4359 
4363 
4368 void gdraw_command_image_draw(GContext *ctx, GDrawCommandImage *image, GPoint offset);
4369 
4375 
4381 
4386 
4391 void gdraw_command_list_iterate(GDrawCommandList *command_list,
4392  GDrawCommandListIteratorCb handle_command, void *callback_context);
4393 
4397 void gdraw_command_list_draw(GContext *ctx, GDrawCommandList *command_list);
4398 
4404 GDrawCommand *gdraw_command_list_get_command(GDrawCommandList *command_list, uint16_t command_idx);
4405 
4410 
4415 
4420 
4424 
4431  uint32_t elapsed_ms);
4432 
4438  uint32_t index);
4439 
4446 
4453 
4458 
4462 void gdraw_command_sequence_set_play_count(GDrawCommandSequence *sequence, uint32_t play_count);
4463 
4468 
4473 
4478 
4480 
4514 
4520 typedef struct GPathInfo {
4522  uint32_t num_points;
4525 } GPathInfo;
4526 
4529 typedef struct GPath {
4531  uint32_t num_points;
4536  int32_t rotation;
4540 } GPath;
4541 
4550 GPath* gpath_create(const GPathInfo *init);
4551 
4553 void gpath_destroy(GPath* gpath);
4554 
4560 void gpath_draw_filled(GContext* ctx, GPath *path);
4561 
4569 void gpath_draw_outline(GContext* ctx, GPath *path);
4570 
4579 void gpath_rotate_to(GPath *path, int32_t angle);
4580 
4588 void gpath_move_to(GPath *path, GPoint point);
4589 
4597 void gpath_draw_outline_open(GContext* ctx, GPath* path);
4598 
4600 
4607 
4608 struct FontInfo;
4609 typedef struct FontInfo FontInfo;
4610 
4615 typedef FontInfo* GFont;
4616 
4624 GFont fonts_get_system_font(const char *font_key);
4625 
4635 
4641 void fonts_unload_custom_font(GFont font);
4642 
4644 
4655 
4660 typedef enum {
4672 
4676 typedef enum {
4683 } GTextAlignment;
4684 
4685 struct GTextAttributes;
4686 typedef struct GTextAttributes GTextAttributes;
4687 
4691 GTextAttributes *graphics_text_attributes_create(void);
4692 
4694 void graphics_text_attributes_destroy(GTextAttributes *text_attributes);
4695 
4700 void graphics_text_attributes_restore_default_text_flow(GTextAttributes *text_attributes);
4701 
4708 void graphics_text_attributes_enable_screen_text_flow(GTextAttributes *text_attributes,
4709  uint8_t inset);
4710 
4715 void graphics_text_attributes_restore_default_paging(GTextAttributes *text_attributes);
4716 
4728 void graphics_text_attributes_enable_paging(GTextAttributes *text_attributes,
4729  GPoint content_origin_on_screen,
4730  GRect paging_on_screen);
4731 
4744 void graphics_draw_text(GContext *ctx, const char *text, GFont const font, const GRect box,
4745  const GTextOverflowMode overflow_mode, const GTextAlignment alignment,
4746  GTextAttributes *text_attributes);
4747 
4758 GSize graphics_text_layout_get_content_size(const char *text, GFont const font, const GRect box,
4759  const GTextOverflowMode overflow_mode,
4760  const GTextAlignment alignment);
4761 
4774  const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode,
4775  const GTextAlignment alignment, GTextAttributes *text_attributes);
4776 
4778 
4780 
4783 
4785 #define SMARTSTRAP_TIMEOUT_DEFAULT 250
4786 
4788 #define SMARTSTRAP_RAW_DATA_SERVICE_ID 0
4789 
4791 #define SMARTSTRAP_RAW_DATA_ATTRIBUTE_ID 0
4792 
4795 #define PBL_IF_SMARTSTRAP_ELSE(if_true, if_false) (if_true)
4796 
4798 typedef enum {
4815 
4817 typedef uint16_t SmartstrapServiceId;
4818 
4820 typedef uint16_t SmartstrapAttributeId;
4821 
4825 
4830  bool is_available);
4831 
4840  const uint8_t *data, size_t length);
4841 
4846 
4849 typedef void (*SmartstrapNotifyHandler)(SmartstrapAttribute *attribute);
4850 
4852 typedef struct {
4862 
4870 
4876 void smartstrap_unsubscribe(void);
4877 
4886 void smartstrap_set_timeout(uint16_t timeout_ms);
4887 
4899  SmartstrapAttributeId attribute_id,
4900  size_t buffer_length);
4901 
4909 
4914 
4920 
4925 
4932 
4942  uint8_t **buffer, size_t *buffer_length);
4943 
4954  size_t write_length, bool request_read);
4955 
4957 
4960 
4963 
4970 typedef void *ClickRecognizerRef;
4971 
4977 typedef void (*ClickHandler)(ClickRecognizerRef recognizer, void *context);
4978 
4990 typedef void (*ClickConfigProvider)(void *context);
4991 
4998 
5004 
5010 
5012 
5050 
5051 struct Layer;
5052 typedef struct Layer Layer;
5053 
5062 typedef void (*LayerUpdateProc)(struct Layer *layer, GContext* ctx);
5063 
5075 Layer* layer_create(GRect frame);
5076 
5089 Layer* layer_create_with_data(GRect frame, size_t data_size);
5090 
5092 void layer_destroy(Layer* layer);
5093 
5103 void layer_mark_dirty(Layer *layer);
5104 
5112 void layer_set_update_proc(Layer *layer, LayerUpdateProc update_proc);
5113 
5121 void layer_set_frame(Layer *layer, GRect frame);
5122 
5129 GRect layer_get_frame(const Layer *layer);
5130 
5136 void layer_set_bounds(Layer *layer, GRect bounds);
5137 
5142 GRect layer_get_bounds(const Layer *layer);
5143 
5148 GRect layer_get_unobstructed_bounds(const Layer *layer);
5149 
5155 GPoint layer_convert_point_to_screen(const Layer *layer, GPoint point);
5156 
5162 GRect layer_convert_rect_to_screen(const Layer *layer, GRect rect);
5163 
5170 struct Window *layer_get_window(const Layer *layer);
5171 
5176 void layer_remove_from_parent(Layer *child);
5177 
5182 void layer_remove_child_layers(Layer *parent);
5183 
5193 void layer_add_child(Layer *parent, Layer *child);
5194 
5204 void layer_insert_below_sibling(Layer *layer_to_insert, Layer *below_sibling_layer);
5205 
5214 void layer_insert_above_sibling(Layer *layer_to_insert, Layer *above_sibling_layer);
5215 
5222 void layer_set_hidden(Layer *layer, bool hidden);
5223 
5227 bool layer_get_hidden(const Layer *layer);
5228 
5236 void layer_set_clips(Layer *layer, bool clips);
5237 
5244 bool layer_get_clips(const Layer *layer);
5245 
5249 void* layer_get_data(const Layer *layer);
5250 
5252 
5277 
5278 struct Window;
5279 typedef struct Window Window;
5280 
5284 typedef void (*WindowHandler)(struct Window *window);
5285 
5291 typedef struct WindowHandlers {
5295 
5301 
5306 
5310 } WindowHandlers;
5311 
5320 Window* window_create(void);
5321 
5323 void window_destroy(Window* window);
5324 
5332 void window_set_click_config_provider(Window *window, ClickConfigProvider click_config_provider);
5333 
5341 void window_set_click_config_provider_with_context(Window *window, ClickConfigProvider click_config_provider, void *context);
5342 
5346 
5349 void *window_get_click_config_context(Window *window);
5350 
5356 void window_set_window_handlers(Window *window, WindowHandlers handlers);
5357 
5364 struct Layer* window_get_root_layer(const Window *window);
5365 
5371 void window_set_background_color(Window *window, GColor background_color);
5372 
5379 bool window_is_loaded(Window *window);
5380 
5386 void window_set_user_data(Window *window, void *data);
5387 
5392 void* window_get_user_data(const Window *window);
5393 
5404 void window_single_click_subscribe(ButtonId button_id, ClickHandler handler);
5405 
5416 void window_single_repeating_click_subscribe(ButtonId button_id, uint16_t repeat_interval_ms, ClickHandler handler);
5417 
5426 void window_multi_click_subscribe(ButtonId button_id, uint8_t min_clicks, uint8_t max_clicks, uint16_t timeout, bool last_click_only, ClickHandler handler);
5427 
5435 void window_long_click_subscribe(ButtonId button_id, uint16_t delay_ms, ClickHandler down_handler, ClickHandler up_handler);
5436 
5444 void window_raw_click_subscribe(ButtonId button_id, ClickHandler down_handler, ClickHandler up_handler, void *context);
5445 
5451 void window_set_click_context(ButtonId button_id, void *context);
5452 
5454 
5477 
5483 void window_stack_push(Window *window, bool animated);
5484 
5488 Window* window_stack_pop(bool animated);
5489 
5492 void window_stack_pop_all(const bool animated);
5493 
5506 bool window_stack_remove(Window *window, bool animated);
5507 
5511 Window* window_stack_get_top_window(void);
5512 
5516 bool window_stack_contains_window(Window *window);
5517 
5519 
5531 
5532 struct Animation;
5533 typedef struct Animation Animation;
5534 
5537 typedef int32_t AnimationProgress;
5538 
5541 typedef enum {
5550  AnimationCurveDefault = AnimationCurveEaseInOut,
5555  // Two more Reserved for forward-compatibility use.
5556  AnimationCurve_Reserved1 = 6,
5557  AnimationCurve_Reserved2 = 7,
5558 } AnimationCurve;
5559 
5571 Animation * animation_create(void);
5572 
5575 bool animation_destroy(Animation *animation);
5576 
5584 #define ANIMATION_DURATION_INFINITE UINT32_MAX
5585 
5589 #define ANIMATION_PLAY_COUNT_INFINITE UINT32_MAX
5590 
5592 #define ANIMATION_NORMALIZED_MIN 0
5593 
5595 #define ANIMATION_NORMALIZED_MAX 65535
5596 
5597 Animation *animation_clone(Animation *from);
5598 
5608 Animation *animation_sequence_create(Animation *animation_a, Animation *animation_b,
5609  Animation *animation_c, ...);
5610 
5616 Animation *animation_sequence_create_from_array(Animation **animation_array, uint32_t array_len);
5617 
5627 Animation *animation_spawn_create(Animation *animation_a, Animation *animation_b,
5628  Animation *animation_c, ...);
5629 
5635 Animation *animation_spawn_create_from_array(Animation **animation_array, uint32_t array_len);
5636 
5642 bool animation_set_elapsed(Animation *animation, uint32_t elapsed_ms);
5643 
5650 bool animation_get_elapsed(Animation *animation, int32_t *elapsed_ms);
5651 
5659 bool animation_set_reverse(Animation *animation, bool reverse);
5660 
5664 bool animation_get_reverse(Animation *animation);
5665 
5674 bool animation_set_play_count(Animation *animation, uint32_t play_count);
5675 
5679 uint32_t animation_get_play_count(Animation *animation);
5680 
5689 bool animation_set_duration(Animation *animation, uint32_t duration_ms);
5690 
5698 uint32_t animation_get_duration(Animation *animation, bool include_delay, bool include_play_count);
5699 
5708 bool animation_set_delay(Animation *animation, uint32_t delay_ms);
5709 
5713 uint32_t animation_get_delay(Animation *animation);
5714 
5723 bool animation_set_curve(Animation *animation, AnimationCurve curve);
5724 
5728 AnimationCurve animation_get_curve(Animation *animation);
5729 
5734 
5743 bool animation_set_custom_curve(Animation *animation, AnimationCurveFunction curve_function);
5744 
5749 
5757 typedef void (*AnimationStartedHandler)(Animation *animation, void *context);
5758 
5770 typedef void (*AnimationStoppedHandler)(Animation *animation, bool finished, void *context);
5771 
5775 typedef struct AnimationHandlers {
5781 
5794 bool animation_set_handlers(Animation *animation, AnimationHandlers callbacks, void *context);
5795 
5802 void *animation_get_context(Animation *animation);
5803 
5817 bool animation_schedule(Animation *animation);
5818 
5827 bool animation_unschedule(Animation *animation);
5828 
5831 void animation_unschedule_all(void);
5832 
5840 bool animation_is_scheduled(Animation *animation);
5841 
5847 typedef void (*AnimationSetupImplementation)(Animation *animation);
5848 
5869 typedef void (*AnimationUpdateImplementation)(Animation *animation,
5870  const AnimationProgress progress);
5871 
5879 typedef void (*AnimationTeardownImplementation)(Animation *animation);
5880 
5896 typedef struct AnimationImplementation {
5907 
5919 bool animation_set_implementation(Animation *animation,
5920  const AnimationImplementation *implementation);
5921 
5926 const AnimationImplementation* animation_get_implementation(Animation *animation);
5927 
5980 
5983 
5986 
5987 struct PropertyAnimation;
5988 typedef struct PropertyAnimation PropertyAnimation;
5989 
6001 PropertyAnimation *property_animation_create_layer_frame(struct Layer *layer, GRect *from_frame,
6002  GRect *to_frame);
6003 
6012 PropertyAnimation *property_animation_create_bounds_origin(struct Layer *layer, GPoint *from,
6013  GPoint *to);
6014 
6032 PropertyAnimation* property_animation_create(const PropertyAnimationImplementation *implementation,
6033  void *subject, void *from_value, void *to_value);
6034 
6037 void property_animation_destroy(PropertyAnimation* property_animation);
6038 
6050 void property_animation_update_int16(PropertyAnimation *property_animation,
6051  const uint32_t distance_normalized);
6052 
6064 void property_animation_update_uint32(PropertyAnimation *property_animation,
6065  const uint32_t distance_normalized);
6066 
6079 void property_animation_update_gpoint(PropertyAnimation *property_animation,
6080  const uint32_t distance_normalized);
6081 
6093 void property_animation_update_grect(PropertyAnimation *property_animation,
6094  const uint32_t distance_normalized);
6095 
6107 void property_animation_update_gcolor8(PropertyAnimation *property_animation,
6108  const uint32_t distance_normalized);
6109 
6113 
6117 
6121 typedef void (*Int16Setter)(void *subject, int16_t int16);
6122 
6127 typedef int16_t (*Int16Getter)(void *subject);
6128 
6132 typedef void (*UInt32Setter)(void *subject, uint32_t uint32);
6133 
6138 typedef uint32_t (*UInt32Getter)(void *subject);
6139 
6143 typedef void (*GPointSetter)(void *subject, GPoint gpoint);
6144 
6148 typedef GPointReturn (*GPointGetter)(void *subject);
6149 
6153 typedef void (*GRectSetter)(void *subject, GRect grect);
6154 
6158 typedef GRectReturn (*GRectGetter)(void *subject);
6159 
6163 typedef void (*GColor8Setter)(void *subject, GColor8 gcolor);
6164 
6169 typedef GColor8 (*GColor8Getter)(void *subject);
6170 
6183  union {
6194  } setter;
6199  union {
6210  } getter;
6212 
6222 
6226 Animation *property_animation_get_animation(PropertyAnimation *property_animation);
6227 
6231 #define property_animation_clone(property_animation) \
6232  (PropertyAnimation *)animation_clone((Animation *)property_animation)
6233 
6238 #define property_animation_get_from_grect(property_animation, value_ptr) \
6239  property_animation_from(property_animation, value_ptr, sizeof(GRect), false)
6240 
6245 #define property_animation_set_from_grect(property_animation, value_ptr) \
6246  property_animation_from(property_animation, value_ptr, sizeof(GRect), true)
6247 
6252 #define property_animation_get_from_gpoint(property_animation, value_ptr) \
6253  property_animation_from(property_animation, value_ptr, sizeof(GPoint), false)
6254 
6259 #define property_animation_set_from_gpoint(property_animation, value_ptr) \
6260  property_animation_from(property_animation, value_ptr, sizeof(GPoint), true)
6261 
6266 #define property_animation_get_from_int16(property_animation, value_ptr) \
6267  property_animation_from(property_animation, value_ptr, sizeof(int16_t), false)
6268 
6273 #define property_animation_set_from_int16(property_animation, value_ptr) \
6274  property_animation_from(property_animation, value_ptr, sizeof(int16_t), true)
6275 
6280 #define property_animation_get_to_grect(property_animation, value_ptr) \
6281  property_animation_to(property_animation, value_ptr, sizeof(GRect), false)
6282 
6287 #define property_animation_set_to_grect(property_animation, value_ptr) \
6288  property_animation_to(property_animation, value_ptr, sizeof(GRect), true)
6289 
6294 #define property_animation_get_to_gpoint(property_animation, value_ptr) \
6295  property_animation_to(property_animation, value_ptr, sizeof(GPoint), false)
6296 
6301 #define property_animation_set_to_gpoint(property_animation, value_ptr) \
6302  property_animation_to(property_animation, value_ptr, sizeof(GPoint), true)
6303 
6308 #define property_animation_get_to_int16(property_animation, value_ptr) \
6309  property_animation_to(property_animation, value_ptr, sizeof(int16_t), false)
6310 
6315 #define property_animation_set_to_int16(property_animation, value_ptr) \
6316  property_animation_to(property_animation, value_ptr, sizeof(int16_t), true)
6317 
6322 #define property_animation_get_subject(property_animation, value_ptr) \
6323  property_animation_subject(property_animation, value_ptr, false)
6324 
6328 #define property_animation_set_subject(property_animation, value_ptr) \
6329  property_animation_subject(property_animation, value_ptr, true)
6330 
6336 bool property_animation_subject(PropertyAnimation *property_animation, void **subject, bool set);
6337 
6344 bool property_animation_from(PropertyAnimation *property_animation, void *from, size_t size,
6345  bool set);
6346 
6353 bool property_animation_to(PropertyAnimation *property_animation, void *to, size_t size,
6354  bool set);
6355 
6357 
6359 
6362 
6367 typedef void (*UnobstructedAreaWillChangeHandler)(GRect final_unobstructed_screen_area,
6368  void *context);
6369 
6373 typedef void (*UnobstructedAreaChangeHandler)(AnimationProgress progress, void *context);
6374 
6377 typedef void (*UnobstructedAreaDidChangeHandler)(void *context);
6378 
6387 
6398 
6401 
6403 
6406 
6420 
6421 struct TextLayer;
6422 typedef struct TextLayer TextLayer;
6423 
6438 TextLayer* text_layer_create(GRect frame);
6439 
6441 void text_layer_destroy(TextLayer* text_layer);
6442 
6447 Layer* text_layer_get_layer(TextLayer *text_layer);
6448 
6457 void text_layer_set_text(TextLayer *text_layer, const char *text);
6458 
6462 const char* text_layer_get_text(TextLayer *text_layer);
6463 
6468 void text_layer_set_background_color(TextLayer *text_layer, GColor color);
6469 
6474 void text_layer_set_text_color(TextLayer *text_layer, GColor color);
6475 
6479 void text_layer_set_overflow_mode(TextLayer *text_layer, GTextOverflowMode line_mode);
6480 
6486 void text_layer_set_font(TextLayer *text_layer, GFont font);
6487 
6492 void text_layer_set_text_alignment(TextLayer *text_layer, GTextAlignment text_alignment);
6493 
6505 void text_layer_enable_screen_text_flow_and_paging(TextLayer *text_layer, uint8_t inset);
6506 
6512 void text_layer_restore_default_text_flow_and_paging(TextLayer *text_layer);
6513 
6517 GSize text_layer_get_content_size(TextLayer *text_layer);
6518 
6523 void text_layer_set_size(TextLayer *text_layer, const GSize max_size);
6524 
6526 
6559 
6560 struct ScrollLayer;
6561 typedef struct ScrollLayer ScrollLayer;
6562 
6564 typedef void (*ScrollLayerCallback)(struct ScrollLayer *scroll_layer, void *context);
6565 
6569 typedef struct ScrollLayerCallbacks {
6570 
6576 
6580 
6582 
6592 ScrollLayer* scroll_layer_create(GRect frame);
6593 
6595 void scroll_layer_destroy(ScrollLayer *scroll_layer);
6596 
6601 Layer* scroll_layer_get_layer(const ScrollLayer *scroll_layer);
6602 
6611 void scroll_layer_add_child(ScrollLayer *scroll_layer, Layer *child);
6612 
6635 void scroll_layer_set_click_config_onto_window(ScrollLayer *scroll_layer, struct Window *window);
6636 
6644 void scroll_layer_set_callbacks(ScrollLayer *scroll_layer, ScrollLayerCallbacks callbacks);
6645 
6655 void scroll_layer_set_context(ScrollLayer *scroll_layer, void *context);
6656 
6667 void scroll_layer_set_content_offset(ScrollLayer *scroll_layer, GPoint offset, bool animated);
6668 
6672 GPoint scroll_layer_get_content_offset(ScrollLayer *scroll_layer);
6673 
6680 void scroll_layer_set_content_size(ScrollLayer *scroll_layer, GSize size);
6681 
6685 GSize scroll_layer_get_content_size(const ScrollLayer *scroll_layer);
6686 
6691 void scroll_layer_set_frame(ScrollLayer *scroll_layer, GRect frame);
6692 
6699 void scroll_layer_scroll_up_click_handler(ClickRecognizerRef recognizer, void *context);
6700 
6707 void scroll_layer_scroll_down_click_handler(ClickRecognizerRef recognizer, void *context);
6708 
6715 void scroll_layer_set_shadow_hidden(ScrollLayer *scroll_layer, bool hidden);
6716 
6720 bool scroll_layer_get_shadow_hidden(const ScrollLayer *scroll_layer);
6721 
6726 void scroll_layer_set_paging(ScrollLayer *scroll_layer, bool paging_enabled);
6727 
6731 bool scroll_layer_get_paging(ScrollLayer *scroll_layer);
6732 
6733 struct ContentIndicator;
6734 typedef struct ContentIndicator ContentIndicator;
6735 
6739 ContentIndicator *scroll_layer_get_content_indicator(ScrollLayer *scroll_layer);
6740 
6744 typedef enum {
6749 
6752 typedef struct {
6753  Layer *layer;
6754  bool times_out;
6756  struct {
6759  } colors;
6761 
6764 ContentIndicator *content_indicator_create(void);
6765 
6768 void content_indicator_destroy(ContentIndicator *content_indicator);
6769 
6777 bool content_indicator_configure_direction(ContentIndicator *content_indicator,
6778  ContentIndicatorDirection direction,
6779  const ContentIndicatorConfig *config);
6780 
6785 bool content_indicator_get_content_available(ContentIndicator *content_indicator,
6786  ContentIndicatorDirection direction);
6787 
6794 void content_indicator_set_content_available(ContentIndicator *content_indicator,
6795  ContentIndicatorDirection direction,
6796  bool available);
6797 
6799 
6829 
6844 void menu_cell_basic_draw(GContext* ctx, const Layer *cell_layer, const char *title,
6845  const char *subtitle, GBitmap *icon);
6846 
6855 void menu_cell_title_draw(GContext* ctx, const Layer *cell_layer, const char *title);
6856 
6865 void menu_cell_basic_header_draw(GContext* ctx, const Layer *cell_layer, const char *title);
6866 
6868 #define MENU_CELL_BASIC_HEADER_HEIGHT ((const int16_t) 16)
6869 
6870 
6871 #define MENU_INDEX_NOT_FOUND ((const uint16_t) ~0)
6872 
6875 typedef struct MenuIndex {
6877  uint16_t section;
6879  uint16_t row;
6880 } MenuIndex;
6881 
6883 #define MenuIndex(section, row) ((MenuIndex){ (section), (row) })
6884 
6890 int16_t menu_index_compare(const MenuIndex *a, const MenuIndex *b);
6891 
6892 typedef struct MenuCellSpan {
6893  int16_t y;
6894  int16_t h;
6895  int16_t sep;
6896  MenuIndex index;
6897 } MenuCellSpan;
6898 
6899 struct MenuLayer;
6900 typedef struct MenuLayer MenuLayer;
6901 
6908 typedef uint16_t (*MenuLayerGetNumberOfSectionsCallback)(struct MenuLayer *menu_layer,
6909  void *callback_context);
6910 
6920 typedef uint16_t (*MenuLayerGetNumberOfRowsInSectionsCallback)(struct MenuLayer *menu_layer,
6921  uint16_t section_index,
6922  void *callback_context);
6923 
6932 typedef int16_t (*MenuLayerGetCellHeightCallback)(struct MenuLayer *menu_layer,
6933  MenuIndex *cell_index,
6934  void *callback_context);
6935 
6945 typedef int16_t (*MenuLayerGetHeaderHeightCallback)(struct MenuLayer *menu_layer,
6946  uint16_t section_index,
6947  void *callback_context);
6948 
6957 typedef int16_t (*MenuLayerGetSeparatorHeightCallback)(struct MenuLayer *menu_layer,
6958  MenuIndex *cell_index,
6959  void *callback_context);
6960 
6973 typedef void (*MenuLayerDrawRowCallback)(GContext* ctx,
6974  const Layer *cell_layer,
6975  MenuIndex *cell_index,
6976  void *callback_context);
6977 
6992 typedef void (*MenuLayerDrawHeaderCallback)(GContext* ctx,
6993  const Layer *cell_layer,
6994  uint16_t section_index,
6995  void *callback_context);
6996 
7009 typedef void (*MenuLayerDrawSeparatorCallback)(GContext* ctx,
7010  const Layer *cell_layer,
7011  MenuIndex *cell_index,
7012  void *callback_context);
7013 
7021 typedef void (*MenuLayerSelectCallback)(struct MenuLayer *menu_layer,
7022  MenuIndex *cell_index,
7023  void *callback_context);
7024 
7033 typedef void (*MenuLayerSelectionChangedCallback)(struct MenuLayer *menu_layer,
7034  MenuIndex new_index,
7035  MenuIndex old_index,
7036  void *callback_context);
7037 
7047 typedef void (*MenuLayerSelectionWillChangeCallback)(struct MenuLayer *menu_layer,
7048  MenuIndex *new_index,
7049  MenuIndex old_index,
7050  void *callback_context);
7051 
7059 typedef void (*MenuLayerDrawBackgroundCallback)(GContext* ctx,
7060  const Layer *bg_layer,
7061  bool highlight,
7062  void *callback_context);
7063 
7065 typedef struct MenuLayerCallbacks {
7070 
7075 
7083 
7089 
7095 
7102 
7107 
7112 
7116 
7121 
7128 
7134 
7143 
7156 MenuLayer* menu_layer_create(GRect frame);
7157 
7159 void menu_layer_destroy(MenuLayer* menu_layer);
7160 
7165 Layer* menu_layer_get_layer(const MenuLayer *menu_layer);
7166 
7171 ScrollLayer* menu_layer_get_scroll_layer(const MenuLayer *menu_layer);
7172 
7181 void menu_layer_set_callbacks(MenuLayer *menu_layer, void *callback_context,
7182  MenuLayerCallbacks callbacks);
7183 
7199 void menu_layer_set_click_config_onto_window(MenuLayer *menu_layer,
7200  struct Window *window);
7201 
7204 typedef enum {
7207 
7211 
7215 
7219 } MenuRowAlign;
7220 
7229 void menu_layer_set_selected_next(MenuLayer *menu_layer,
7230  bool up,
7231  MenuRowAlign scroll_align,
7232  bool animated);
7233 
7243 void menu_layer_set_selected_index(MenuLayer *menu_layer,
7244  MenuIndex index, MenuRowAlign scroll_align,
7245  bool animated);
7246 
7253 MenuIndex menu_layer_get_selected_index(const MenuLayer *menu_layer);
7254 
7261 void menu_layer_reload_data(MenuLayer *menu_layer);
7262 
7270 bool menu_cell_layer_is_highlighted(const Layer *cell_layer);
7271 
7281 void menu_layer_set_normal_colors(MenuLayer *menu_layer, GColor background, GColor foreground);
7282 
7292 void menu_layer_set_highlight_colors(MenuLayer *menu_layer, GColor background, GColor foreground);
7293 
7303 void menu_layer_pad_bottom_enable(MenuLayer *menu_layer, bool enable);
7304 
7307 bool menu_layer_get_center_focused(MenuLayer *menu_layer);
7308 
7315 void menu_layer_set_center_focused(MenuLayer *menu_layer, bool center_focused);
7316 
7322 bool menu_layer_is_index_selected(const MenuLayer *menu_layer, MenuIndex *index);
7323 
7326 #define MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT ((const int16_t) 68)
7327 
7330 #define MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT ((const int16_t) 24)
7331 
7334 #define MENU_CELL_ROUND_FOCUSED_TALL_CELL_HEIGHT ((const int16_t) 84)
7335 
7338 #define MENU_CELL_ROUND_UNFOCUSED_TALL_CELL_HEIGHT ((const int16_t) 32)
7339 
7341 
7348 
7349 struct SimpleMenuLayer;
7350 typedef struct SimpleMenuLayer SimpleMenuLayer;
7351 
7356 typedef void (*SimpleMenuLayerSelectCallback)(int index, void *context);
7357 
7359 typedef struct {
7361  const char *title;
7363  const char *subtitle;
7365  GBitmap *icon;
7369 } SimpleMenuItem;
7370 
7372 typedef struct {
7374  const char *title;
7378  uint32_t num_items;
7380 
7394 SimpleMenuLayer* simple_menu_layer_create(GRect frame, Window *window,
7395  const SimpleMenuSection *sections, int32_t num_sections, void *callback_context);
7396 
7398 void simple_menu_layer_destroy(SimpleMenuLayer* menu_layer);
7399 
7405 Layer* simple_menu_layer_get_layer(const SimpleMenuLayer *simple_menu);
7406 
7410 int simple_menu_layer_get_selected_index(const SimpleMenuLayer *simple_menu);
7411 
7417 void simple_menu_layer_set_selected_index(SimpleMenuLayer *simple_menu, int32_t index, bool animated);
7418 
7421 MenuLayer *simple_menu_layer_get_menu_layer(SimpleMenuLayer *simple_menu);
7422 
7424 
7497 
7499 #define ACTION_BAR_WIDTH _ACTION_BAR_WIDTH(PBL_PLATFORM_TYPE_CURRENT)
7500 
7502 #define _ACTION_BAR_WIDTH(plat) PBL_PLATFORM_SWITCH(plat, \
7503  /*aplite*/ 30, \
7504  /*basalt*/ 30, \
7505  /*chalk*/ 40, \
7506  /*diorite*/ 30, \
7507  /*emery*/ 34)
7508 
7510 #define NUM_ACTION_BAR_ITEMS 3
7511 
7512 typedef enum {
7513  ActionBarLayerIconPressAnimationNone = 0,
7514  ActionBarLayerIconPressAnimationMoveLeft,
7515  ActionBarLayerIconPressAnimationMoveUp,
7516  ActionBarLayerIconPressAnimationMoveRight,
7517  ActionBarLayerIconPressAnimationMoveDown,
7518 } ActionBarLayerIconPressAnimation;
7519 
7520 struct ActionBarLayer;
7521 typedef struct ActionBarLayer ActionBarLayer;
7522 
7530 ActionBarLayer* action_bar_layer_create(void);
7531 
7533 void action_bar_layer_destroy(ActionBarLayer *action_bar_layer);
7534 
7539 Layer* action_bar_layer_get_layer(ActionBarLayer *action_bar_layer);
7540 
7549 void action_bar_layer_set_context(ActionBarLayer *action_bar, void *context);
7550 
7564 void action_bar_layer_set_click_config_provider(ActionBarLayer *action_bar, ClickConfigProvider click_config_provider);
7565 
7578 void action_bar_layer_set_icon(ActionBarLayer *action_bar, ButtonId button_id, const GBitmap *icon);
7579 
7585 void action_bar_layer_clear_icon(ActionBarLayer *action_bar, ButtonId button_id);
7586 
7608 void action_bar_layer_add_to_window(ActionBarLayer *action_bar, struct Window *window);
7609 
7615 void action_bar_layer_remove_from_window(ActionBarLayer *action_bar);
7616 
7621 void action_bar_layer_set_background_color(ActionBarLayer *action_bar, GColor background_color);
7622 
7635 void action_bar_layer_set_icon_animated(ActionBarLayer *action_bar, ButtonId button_id,
7636  const GBitmap *icon, bool animated);
7637 
7645 void action_bar_layer_set_icon_press_animation(ActionBarLayer *action_bar, ButtonId button_id,
7646  ActionBarLayerIconPressAnimation animation);
7647 
7649 
7653 
7654 struct StatusBarLayer;
7655 typedef struct StatusBarLayer StatusBarLayer;
7656 
7658 typedef enum {
7664 
7666 #define STATUS_BAR_LAYER_HEIGHT _STATUS_BAR_LAYER_HEIGHT(PBL_PLATFORM_TYPE_CURRENT)
7667 
7669 #define _STATUS_BAR_LAYER_HEIGHT(plat) PBL_PLATFORM_SWITCH(plat, \
7670  /*aplite*/ 16, \
7671  /*basalt*/ 16, \
7672  /*chalk*/ 24, \
7673  /*diorite*/ 16, \
7674  /*emery*/ 20)
7675 
7693 StatusBarLayer *status_bar_layer_create(void);
7694 
7697 void status_bar_layer_destroy(StatusBarLayer *status_bar_layer);
7698 
7704 Layer *status_bar_layer_get_layer(StatusBarLayer *status_bar_layer);
7705 
7709 GColor status_bar_layer_get_background_color(const StatusBarLayer *status_bar_layer);
7710 
7714 GColor status_bar_layer_get_foreground_color(const StatusBarLayer *status_bar_layer);
7715 
7720 void status_bar_layer_set_colors(StatusBarLayer *status_bar_layer, GColor background,
7721  GColor foreground);
7722 
7726 void status_bar_layer_set_separator_mode(StatusBarLayer *status_bar_layer,
7728 
7730 
7750 
7751 struct BitmapLayer;
7752 typedef struct BitmapLayer BitmapLayer;
7753 
7762 BitmapLayer* bitmap_layer_create(GRect frame);
7763 
7765 void bitmap_layer_destroy(BitmapLayer* bitmap_layer);
7766 
7771 Layer* bitmap_layer_get_layer(const BitmapLayer *bitmap_layer);
7772 
7777 const GBitmap* bitmap_layer_get_bitmap(BitmapLayer *bitmap_layer);
7778 
7786 void bitmap_layer_set_bitmap(BitmapLayer *bitmap_layer, const GBitmap *bitmap);
7787 
7797 void bitmap_layer_set_alignment(BitmapLayer *bitmap_layer, GAlign alignment);
7798 
7805 void bitmap_layer_set_background_color(BitmapLayer *bitmap_layer, GColor color);
7806 
7824 void bitmap_layer_set_compositing_mode(BitmapLayer *bitmap_layer, GCompOp mode);
7825 
7827 
7847 
7848 struct RotBitmapLayer;
7849 typedef struct RotBitmapLayer RotBitmapLayer;
7850 
7859 RotBitmapLayer* rot_bitmap_layer_create(GBitmap *bitmap);
7860 
7864 void rot_bitmap_layer_destroy(RotBitmapLayer *bitmap);
7865 
7870 void rot_bitmap_layer_set_corner_clip_color(RotBitmapLayer *bitmap, GColor color);
7871 
7875 void rot_bitmap_layer_set_angle(RotBitmapLayer *bitmap, int32_t angle);
7876 
7880 void rot_bitmap_layer_increment_angle(RotBitmapLayer *bitmap, int32_t angle_change);
7881 
7892 void rot_bitmap_set_src_ic(RotBitmapLayer *bitmap, GPoint ic);
7893 
7901 void rot_bitmap_set_compositing_mode(RotBitmapLayer *bitmap, GCompOp mode);
7902 
7904 
7906 
7909 
7915 
7916 struct NumberWindow;
7917 typedef struct NumberWindow NumberWindow;
7918 
7920 typedef void (*NumberWindowCallback)(struct NumberWindow *number_window, void *context);
7921 
7923 typedef struct {
7935 
7944 NumberWindow* number_window_create(const char *label, NumberWindowCallbacks callbacks, void *callback_context);
7945 
7947 void number_window_destroy(NumberWindow* number_window);
7948 
7954 void number_window_set_label(NumberWindow *numberwindow, const char *label);
7955 
7960 void number_window_set_max(NumberWindow *numberwindow, int32_t max);
7961 
7966 void number_window_set_min(NumberWindow *numberwindow, int32_t min);
7967 
7972 void number_window_set_value(NumberWindow *numberwindow, int32_t value);
7973 
7978 void number_window_set_step_size(NumberWindow *numberwindow, int32_t step);
7979 
7984 int32_t number_window_get_value(const NumberWindow *numberwindow);
7985 
7989 Window *number_window_get_window(NumberWindow *numberwindow);
7990 
7992 
7995 
7996 struct ActionMenuItem;
7997 typedef struct ActionMenuItem ActionMenuItem;
7998 
7999 struct ActionMenuLevel;
8000 typedef struct ActionMenuLevel ActionMenuLevel;
8001 
8002 typedef enum {
8003  ActionMenuAlignTop = 0,
8004  ActionMenuAlignCenter
8005 } ActionMenuAlign;
8006 
8007 typedef struct ActionMenu ActionMenu;
8008 
8014 typedef void (*ActionMenuDidCloseCb)(ActionMenu *menu,
8015  const ActionMenuItem *performed_action,
8016  void *context);
8017 
8020 typedef enum {
8024 
8031 typedef void (*ActionMenuPerformActionCb)(ActionMenu *action_menu,
8032  const ActionMenuItem *action,
8033  void *context);
8034 
8038 typedef void (*ActionMenuEachItemCb)(const ActionMenuItem *item, void *context);
8039 
8041 typedef struct {
8042  const ActionMenuLevel *root_level;
8043  void *context;
8044  struct {
8047  } colors;
8050  ActionMenuAlign align;
8052 
8056 char *action_menu_item_get_label(const ActionMenuItem *item);
8057 
8062 void *action_menu_item_get_action_data(const ActionMenuItem *item);
8063 
8070 ActionMenuLevel *action_menu_level_create(uint16_t max_items);
8071 
8075 void action_menu_level_set_display_mode(ActionMenuLevel *level,
8076  ActionMenuLevelDisplayMode display_mode);
8077 
8084 ActionMenuItem *action_menu_level_add_action(ActionMenuLevel *level,
8085  const char *label,
8087  void *action_data);
8088 
8094 ActionMenuItem *action_menu_level_add_child(ActionMenuLevel *level,
8095  ActionMenuLevel *child,
8096  const char *label);
8097 
8106 void action_menu_hierarchy_destroy(const ActionMenuLevel *root,
8107  ActionMenuEachItemCb each_cb,
8108  void *context);
8109 
8114 void *action_menu_get_context(ActionMenu *action_menu);
8115 
8119 ActionMenuLevel *action_menu_get_root_level(ActionMenu *action_menu);
8120 
8125 ActionMenu *action_menu_open(ActionMenuConfig *config);
8126 
8130 void action_menu_freeze(ActionMenu *action_menu);
8131 
8134 void action_menu_unfreeze(ActionMenu *action_menu);
8135 
8142 void action_menu_set_result_window(ActionMenu *action_menu, Window *result_window);
8143 
8149 void action_menu_close(ActionMenu *action_menu, bool animated);
8150 
8152 
8154 
8167 
8184 typedef struct {
8189  const uint32_t *durations;
8193  uint32_t num_segments;
8194 } VibePattern;
8195 
8198 void vibes_cancel(void);
8199 
8201 void vibes_short_pulse(void);
8202 
8204 void vibes_long_pulse(void);
8205 
8208 void vibes_double_pulse(void);
8209 
8214 
8216 
8225 
8228 void light_enable_interaction(void);
8229 
8234 void light_enable(bool enable);
8235 
8237 
8243 
8248 uint32_t preferred_result_display_duration(void);
8249 
8255 typedef enum PreferredContentSize {
8256  PreferredContentSizeSmall,
8257  PreferredContentSizeMedium,
8258  PreferredContentSizeLarge,
8259  PreferredContentSizeExtraLarge,
8260  NumPreferredContentSizes,
8262 
8267 
8271 bool quiet_time_is_active(void);
8272 
8274 
8276 
8279 
8281 
8284 
8294 
8295 #define TZ_LEN 6
8296 
8297 #define SECONDS_PER_MINUTE (60)
8298 
8299 #define MINUTES_PER_HOUR (60)
8300 
8301 #define SECONDS_PER_HOUR (SECONDS_PER_MINUTE * MINUTES_PER_HOUR)
8302 
8303 #define HOURS_PER_DAY (24)
8304 
8305 #define MINUTES_PER_DAY (HOURS_PER_DAY * MINUTES_PER_HOUR)
8306 
8307 #define SECONDS_PER_DAY (MINUTES_PER_DAY * SECONDS_PER_MINUTE)
8308 
8311 struct tm {
8312  int tm_sec;
8313  int tm_min;
8314  int tm_hour;
8315  int tm_mday;
8316  int tm_mon;
8317  int tm_year;
8318  int tm_wday;
8319  int tm_yday;
8320  int tm_isdst;
8323  char tm_zone[TZ_LEN];
8324 };
8325 
8333 int strftime(char* s, size_t maxsize, const char* format, const struct tm* tm_p);
8334 
8340 struct tm *localtime(const time_t *timep);
8341 
8346 struct tm *gmtime(const time_t *timep);
8347 
8352 time_t mktime(struct tm *tb);
8353 
8359 time_t time(time_t *tloc) noexcept;
8360 
8372 double difftime(time_t end, time_t beginning) noexcept;
8373 
8383 uint16_t time_ms(time_t *t_utc, uint16_t *out_ms);
8384 
8387 time_t time_start_of_today(void);
8388 
8390 
SmartstrapAttribute
struct SmartstrapAttribute SmartstrapAttribute
Definition: pebble.h:4824
animation_set_implementation
bool animation_set_implementation(Animation *animation, const AnimationImplementation *implementation)
MenuRowAlignTop
@ MenuRowAlignTop
Definition: pebble.h:7214
grect_clip
void grect_clip(GRect *const rect_to_clip, const GRect *const rect_clipper)
battery_state_service_unsubscribe
void battery_state_service_unsubscribe(void)
clock_is_timezone_set
bool clock_is_timezone_set(void)
action_bar_layer_get_layer
Layer * action_bar_layer_get_layer(ActionBarLayer *action_bar_layer)
layer_get_unobstructed_bounds
GRect layer_get_unobstructed_bounds(const Layer *layer)
DATA_LOGGING_INTERNAL_ERR
@ DATA_LOGGING_INTERNAL_ERR
An internal error occurred.
Definition: pebble.h:1384
ContentIndicatorConfig::foreground
GColor foreground
The color of the arrow.
Definition: pebble.h:6757
GPathInfo
Definition: pebble.h:4520
GDrawCommandSequence
struct GDrawCommandSequence GDrawCommandSequence
Definition: pebble.h:4230
content_indicator_create
ContentIndicator * content_indicator_create(void)
AppFocusHandlers::did_focus
AppFocusHandler did_focus
Definition: pebble.h:519
SNIFF_INTERVAL_NORMAL
@ SNIFF_INTERVAL_NORMAL
Set the sniff interval to normal (power-saving) mode.
Definition: pebble.h:2819
layer_create
Layer * layer_create(GRect frame)
HealthEventHeartRateUpdate
@ HealthEventHeartRateUpdate
Value of HealthMetricHeartRateBPM or HealthMetricHeartRateRawBPM has changed.
Definition: pebble.h:1168
GPoint
Definition: pebble.h:3316
property_animation_create_layer_frame
PropertyAnimation * property_animation_create_layer_frame(struct Layer *layer, GRect *from_frame, GRect *to_frame)
accel_tap_service_unsubscribe
void accel_tap_service_unsubscribe(void)
connection_service_subscribe
void connection_service_subscribe(ConnectionHandlers conn_handlers)
compass_service_subscribe
void compass_service_subscribe(CompassHeadingHandler handler)
ActionMenuEachItemCb
void(* ActionMenuEachItemCb)(const ActionMenuItem *item, void *context)
Definition: pebble.h:8038
HealthServiceAccessibilityMaskNoPermission
@ HealthServiceAccessibilityMaskNoPermission
The user hasn't granted permission.
Definition: pebble.h:1085
AnimationHandlers
Definition: pebble.h:5775
GPointSetter
void(* GPointSetter)(void *subject, GPoint gpoint)
Definition: pebble.h:6143
graphics_context_set_antialiased
void graphics_context_set_antialiased(GContext *ctx, bool enable)
PropertyAnimationAccessors::int16
Int16Setter int16
Use if the property to animate is of int16_t type.
Definition: pebble.h:6185
AmbientLightLevel
AmbientLightLevel
Light level enum.
Definition: pebble.h:1245
graphics_draw_pixel
void graphics_draw_pixel(GContext *ctx, GPoint point)
smartstrap_attribute_end_write
SmartstrapResult smartstrap_attribute_end_write(SmartstrapAttribute *attribute, size_t write_length, bool request_read)
MenuLayerGetNumberOfRowsInSectionsCallback
uint16_t(* MenuLayerGetNumberOfRowsInSectionsCallback)(struct MenuLayer *menu_layer, uint16_t section_index, void *callback_context)
Definition: pebble.h:6920
HealthMetricRestingKCalories
@ HealthMetricRestingKCalories
The number of kcal (Calories) burned while resting due to resting metabolism.
Definition: pebble.h:871
HealthActivitySleep
@ HealthActivitySleep
The 'sleeping' activity.
Definition: pebble.h:1025
NumberWindowCallbacks::selected
NumberWindowCallback selected
Definition: pebble.h:7933
E_DOES_NOT_EXIST
@ E_DOES_NOT_EXIST
Target of operation does not exist.
Definition: pebble.h:2955
window_get_user_data
void * window_get_user_data(const Window *window)
ACCEL_SAMPLING_25HZ
@ ACCEL_SAMPLING_25HZ
25 HZ sampling rate [Default]
Definition: pebble.h:664
action_menu_hierarchy_destroy
void action_menu_hierarchy_destroy(const ActionMenuLevel *root, ActionMenuEachItemCb each_cb, void *context)
data_logging_create
DataLoggingSessionRef data_logging_create(uint32_t tag, DataLoggingItemType item_type, uint16_t item_length, bool resume)
GCornersBottom
@ GCornersBottom
Bottom corners.
Definition: pebble.h:3971
ClickHandler
void(* ClickHandler)(ClickRecognizerRef recognizer, void *context)
Definition: pebble.h:4977
WATCH_INFO_COLOR_ORANGE
@ WATCH_INFO_COLOR_ORANGE
Orange.
Definition: pebble.h:227
HealthMinuteData
Definition: pebble.h:1260
ScrollLayerCallbacks::content_offset_changed_handler
ScrollLayerCallback content_offset_changed_handler
Definition: pebble.h:6579
app_timer_reschedule
bool app_timer_reschedule(AppTimer *timer_handle, uint32_t new_timeout_ms)
action_menu_set_result_window
void action_menu_set_result_window(ActionMenu *action_menu, Window *result_window)
gdraw_command_sequence_clone
GDrawCommandSequence * gdraw_command_sequence_clone(GDrawCommandSequence *sequence)
WATCH_INFO_MODEL_UNKNOWN
@ WATCH_INFO_MODEL_UNKNOWN
Unknown model.
Definition: pebble.h:207
TUESDAY
@ TUESDAY
Tuesday.
Definition: pebble.h:339
time
time_t time(time_t *tloc) noexcept
action_menu_freeze
void action_menu_freeze(ActionMenu *action_menu)
SmartstrapResult
SmartstrapResult
Error values which may be returned from the smartstrap APIs.
Definition: pebble.h:4798
graphics_text_attributes_destroy
void graphics_text_attributes_destroy(GTextAttributes *text_attributes)
Destroys a previously created instance of GTextAttributes.
GPath::offset
GPoint offset
Definition: pebble.h:4539
E_AGAIN
@ E_AGAIN
Operation not completed; try again.
Definition: pebble.h:2964
WindowHandler
void(* WindowHandler)(struct Window *window)
Definition: pebble.h:5284
dictation_session_stop
DictationSessionStatus dictation_session_stop(DictationSession *session)
APP_EXIT_NOT_SPECIFIED
@ APP_EXIT_NOT_SPECIFIED
Exit reason not specified.
Definition: pebble.h:3169
bitmap_layer_set_compositing_mode
void bitmap_layer_set_compositing_mode(BitmapLayer *bitmap_layer, GCompOp mode)
window_stack_pop
Window * window_stack_pop(bool animated)
ActionMenuLevelDisplayModeThin
@ ActionMenuLevelDisplayModeThin
Grid view: multiple items per row.
Definition: pebble.h:8022
AnimationStoppedHandler
void(* AnimationStoppedHandler)(Animation *animation, bool finished, void *context)
Definition: pebble.h:5770
gbitmap_create_with_data
GBitmap * gbitmap_create_with_data(const uint8_t *data)
gdraw_command_list_get_num_commands
uint32_t gdraw_command_list_get_num_commands(GDrawCommandList *command_list)
localtime
struct tm * localtime(const time_t *timep)
animation_get_duration
uint32_t animation_get_duration(Animation *animation, bool include_delay, bool include_play_count)
menu_layer_set_normal_colors
void menu_layer_set_normal_colors(MenuLayer *menu_layer, GColor background, GColor foreground)
preferred_content_size
PreferredContentSize preferred_content_size(void)
unobstructed_area_service_subscribe
void unobstructed_area_service_subscribe(UnobstructedAreaHandlers handlers, void *context)
gdraw_command_sequence_get_frame_by_index
GDrawCommandFrame * gdraw_command_sequence_get_frame_by_index(GDrawCommandSequence *sequence, uint32_t index)
AnimationHandlers::started
AnimationStartedHandler started
The handler that will be called when an animation is started.
Definition: pebble.h:5777
APP_LAUNCH_WAKEUP
@ APP_LAUNCH_WAKEUP
App launched by wakeup event.
Definition: pebble.h:3137
watch_info_get_model
WatchInfoModel watch_info_get_model(void)
animation_unschedule
bool animation_unschedule(Animation *animation)
WATCH_INFO_COLOR_PEBBLE_2_HR_BLACK
@ WATCH_INFO_COLOR_PEBBLE_2_HR_BLACK
Pebble 2 HR, Black / Charcoal.
Definition: pebble.h:251
HealthActivityIteratorCB
bool(* HealthActivityIteratorCB)(HealthActivity activity, time_t time_start, time_t time_end, void *context)
Definition: pebble.h:1048
app_comm_set_sniff_interval
void app_comm_set_sniff_interval(const SniffInterval interval)
HealthActivity
HealthActivity
Health-related activities that can be accessed using.
Definition: pebble.h:1021
graphics_draw_arc
void graphics_draw_arc(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, int32_t angle_start, int32_t angle_end)
WatchInfoModel
WatchInfoModel
The different watch models.
Definition: pebble.h:206
HealthServiceAccessibilityMask
HealthServiceAccessibilityMask
Definition: pebble.h:1081
HealthMetric
HealthMetric
Definition: pebble.h:859
SmartstrapResultTimeOut
@ SmartstrapResultTimeOut
A time-out occured during the request.
Definition: pebble.h:4813
GOvalScaleModeFitCircle
@ GOvalScaleModeFitCircle
Places the largest possible fully visible circle in the center of a rectangle.
Definition: pebble.h:4101
APP_EXIT_ACTION_PERFORMED_SUCCESSFULLY
@ APP_EXIT_ACTION_PERFORMED_SUCCESSFULLY
Application performed an action when it exited.
Definition: pebble.h:3170
GAlignCenter
@ GAlignCenter
Align by centering.
Definition: pebble.h:3715
CompassStatusCalibrating
@ CompassStatusCalibrating
Compass is calibrating: the data is valid but the calibration is still being refined.
Definition: pebble.h:745
GColor8::r
uint8_t r
Red.
Definition: pebble.h:3273
AppWorkerMessageHandler
void(* AppWorkerMessageHandler)(uint16_t type, AppWorkerMessage *data)
Definition: pebble.h:2779
DictationSessionStatusCallback
void(* DictationSessionStatusCallback)(DictationSession *session, DictationSessionStatus status, char *transcription, void *context)
Definition: pebble.h:2014
graphics_draw_circle
void graphics_draw_circle(GContext *ctx, GPoint p, uint16_t radius)
ConnectionHandlers
Definition: pebble.h:445
scroll_layer_get_shadow_hidden
bool scroll_layer_get_shadow_hidden(const ScrollLayer *scroll_layer)
BatteryChargeState::charge_percent
uint8_t charge_percent
A percentage (0-100) of how full the battery is.
Definition: pebble.h:564
simple_menu_layer_get_menu_layer
MenuLayer * simple_menu_layer_get_menu_layer(SimpleMenuLayer *simple_menu)
AppMessageInboxReceived
void(* AppMessageInboxReceived)(DictionaryIterator *iterator, void *context)
Definition: pebble.h:2241
app_message_deregister_callbacks
void app_message_deregister_callbacks(void)
tm::tm_min
int tm_min
Definition: pebble.h:8313
WatchInfoVersion::minor
uint8_t minor
Minor version number.
Definition: pebble.h:272
bitmap_layer_set_background_color
void bitmap_layer_set_background_color(BitmapLayer *bitmap_layer, GColor color)
UnobstructedAreaHandlers
Definition: pebble.h:6379
SmartstrapHandlers
Handlers which are passed to smartstrap_subscribe.
Definition: pebble.h:4852
property_animation_update_grect
void property_animation_update_grect(PropertyAnimation *property_animation, const uint32_t distance_normalized)
dict_write_tuplet
DictionaryResult dict_write_tuplet(DictionaryIterator *iter, const Tuplet *const tuplet)
APP_MSG_NOT_CONNECTED
@ APP_MSG_NOT_CONNECTED
(8) The other end was not connected.
Definition: pebble.h:2173
number_window_destroy
void number_window_destroy(NumberWindow *number_window)
Destroys a NumberWindow previously created by number_window_create.
SimpleMenuSection::title
const char * title
Title of the section. Optional, leave NULL if unused.
Definition: pebble.h:7374
WATCH_INFO_COLOR_PEBBLE_2_SE_BLACK
@ WATCH_INFO_COLOR_PEBBLE_2_SE_BLACK
Pebble 2 SE, Black / Charcoal.
Definition: pebble.h:257
window_set_click_context
void window_set_click_context(ButtonId button_id, void *context)
APP_MSG_SEND_TIMEOUT
@ APP_MSG_SEND_TIMEOUT
(2) The other end did not confirm receiving the sent data with an (n)ack in time.
Definition: pebble.h:2167
gdraw_command_get_type
GDrawCommandType gdraw_command_get_type(GDrawCommand *command)
gbitmap_create_blank
GBitmap * gbitmap_create_blank(GSize size, GBitmapFormat format)
bitmap_layer_create
BitmapLayer * bitmap_layer_create(GRect frame)
menu_layer_create
MenuLayer * menu_layer_create(GRect frame)
WATCH_INFO_COLOR_PEBBLE_2_HR_FLAME
@ WATCH_INFO_COLOR_PEBBLE_2_HR_FLAME
Pebble 2 HR, Charcoal / Red.
Definition: pebble.h:253
gdraw_command_frame_get_duration
uint32_t gdraw_command_frame_get_duration(GDrawCommandFrame *frame)
dict_calc_buffer_size_from_tuplets
uint32_t dict_calc_buffer_size_from_tuplets(const Tuplet *const tuplets, const uint8_t tuplets_count)
PropertyAnimationImplementation
struct PropertyAnimationImplementation PropertyAnimationImplementation
Definition: pebble.h:5985
WindowHandlers::disappear
WindowHandler disappear
Definition: pebble.h:5305
ACCEL_AXIS_X
@ ACCEL_AXIS_X
Definition: pebble.h:634
MenuLayerGetNumberOfSectionsCallback
uint16_t(* MenuLayerGetNumberOfSectionsCallback)(struct MenuLayer *menu_layer, void *callback_context)
Definition: pebble.h:6908
graphics_text_attributes_enable_paging
void graphics_text_attributes_enable_paging(GTextAttributes *text_attributes, GPoint content_origin_on_screen, GRect paging_on_screen)
HealthMetricWalkedDistanceMeters
@ HealthMetricWalkedDistanceMeters
The distance walked, in meters.
Definition: pebble.h:865
i18n_get_system_locale
const char * i18n_get_system_locale(void)
WATCH_INFO_COLOR_TIME_ROUND_ROSE_GOLD_14
@ WATCH_INFO_COLOR_TIME_ROUND_ROSE_GOLD_14
Time Round 14mm lug size, Rose Gold.
Definition: pebble.h:249
AnimationImplementation::setup
AnimationSetupImplementation setup
Definition: pebble.h:5899
animation_set_reverse
bool animation_set_reverse(Animation *animation, bool reverse)
number_window_get_value
int32_t number_window_get_value(const NumberWindow *numberwindow)
window_stack_get_top_window
Window * window_stack_get_top_window(void)
atan2_lookup
int32_t atan2_lookup(int16_t y, int16_t x)
scroll_layer_scroll_down_click_handler
void scroll_layer_scroll_down_click_handler(ClickRecognizerRef recognizer, void *context)
bitmap_layer_get_bitmap
const GBitmap * bitmap_layer_get_bitmap(BitmapLayer *bitmap_layer)
gpath_draw_outline_open
void gpath_draw_outline_open(GContext *ctx, GPath *path)
MenuCellSpan
Definition: pebble.h:6892
scroll_layer_set_callbacks
void scroll_layer_set_callbacks(ScrollLayer *scroll_layer, ScrollLayerCallbacks callbacks)
gsize_equal
bool gsize_equal(const GSize *size_a, const GSize *size_b)
smartstrap_attribute_create
SmartstrapAttribute * smartstrap_attribute_create(SmartstrapServiceId service_id, SmartstrapAttributeId attribute_id, size_t buffer_length)
mktime
time_t mktime(struct tm *tb)
SmartstrapNotifyHandler
void(* SmartstrapNotifyHandler)(SmartstrapAttribute *attribute)
Definition: pebble.h:4849
app_worker_is_running
bool app_worker_is_running(void)
number_window_set_max
void number_window_set_max(NumberWindow *numberwindow, int32_t max)
gdraw_command_set_stroke_width
void gdraw_command_set_stroke_width(GDrawCommand *command, uint8_t stroke_width)
HealthEventMetricAlert
@ HealthEventMetricAlert
A metric has crossed the threshold set by health_service_register_metric_alert.
Definition: pebble.h:1166
MenuRowAlign
MenuRowAlign
Definition: pebble.h:7204
GCompOpAssignInverted
@ GCompOpAssignInverted
Definition: pebble.h:3770
gdraw_command_get_fill_color
GColor gdraw_command_get_fill_color(GDrawCommand *command)
layer_remove_from_parent
void layer_remove_from_parent(Layer *child)
HealthEventMovementUpdate
@ HealthEventMovementUpdate
Definition: pebble.h:1161
grect_crop
GRect grect_crop(GRect rect, const int32_t crop_size_px)
HealthMetricSleepRestfulSeconds
@ HealthMetricSleepRestfulSeconds
The number of sleep seconds in the 'restful' or deep sleep state.
Definition: pebble.h:869
window_single_click_subscribe
void window_single_click_subscribe(ButtonId button_id, ClickHandler handler)
smartstrap_attribute_begin_write
SmartstrapResult smartstrap_attribute_begin_write(SmartstrapAttribute *attribute, uint8_t **buffer, size_t *buffer_length)
gdraw_command_image_clone
GDrawCommandImage * gdraw_command_image_clone(GDrawCommandImage *image)
WATCH_INFO_MODEL_PEBBLE_2_SE
@ WATCH_INFO_MODEL_PEBBLE_2_SE
Pebble 2 SE.
Definition: pebble.h:215
APP_LOG_LEVEL_ERROR
@ APP_LOG_LEVEL_ERROR
Error level log message.
Definition: pebble.h:1521
dictation_session_start
DictationSessionStatus dictation_session_start(DictationSession *session)
GAlignBottomRight
@ GAlignBottomRight
Align by making the bottom edges overlap and right edges overlap.
Definition: pebble.h:3729
menu_layer_get_scroll_layer
ScrollLayer * menu_layer_get_scroll_layer(const MenuLayer *menu_layer)
SimpleMenuItem::title
const char * title
The title of the menu item. Required.
Definition: pebble.h:7361
graphics_text_attributes_restore_default_paging
void graphics_text_attributes_restore_default_paging(GTextAttributes *text_attributes)
HealthAggregationMax
@ HealthAggregationMax
Definition: pebble.h:969
GFont
FontInfo * GFont
Definition: pebble.h:4615
health_service_metric_accessible
HealthServiceAccessibilityMask health_service_metric_accessible(HealthMetric metric, time_t time_start, time_t time_end)
ActionMenuLevelDisplayMode
ActionMenuLevelDisplayMode
Definition: pebble.h:8020
GSize
#define GSize(w, h)
Convenience macro to make a GSize.
Definition: pebble.h:3344
TickHandler
void(* TickHandler)(struct tm *tick_time, TimeUnits units_changed)
Definition: pebble.h:833
dict_read_first
Tuple * dict_read_first(DictionaryIterator *iter)
quiet_time_is_active
bool quiet_time_is_active(void)
WATCH_INFO_COLOR_PEBBLE_2_HR_AQUA
@ WATCH_INFO_COLOR_PEBBLE_2_HR_AQUA
Pebble 2 HR, White / Turquoise.
Definition: pebble.h:255
animation_set_play_count
bool animation_set_play_count(Animation *animation, uint32_t play_count)
GColor8::b
uint8_t b
Blue.
Definition: pebble.h:3271
dict_calc_buffer_size
uint32_t dict_calc_buffer_size(const uint8_t tuple_count,...)
dict_find
Tuple * dict_find(const DictionaryIterator *iter, const uint32_t key)
GDrawCommandTypeCircle
@ GDrawCommandTypeCircle
Circle draw command type.
Definition: pebble.h:4235
Tuplet
struct Tuplet Tuplet
MenuLayerCallbacks
Data structure containing all the callbacks of a MenuLayer.
Definition: pebble.h:7065
tm::tm_wday
int tm_wday
Definition: pebble.h:8318
health_service_get_minute_history
uint32_t health_service_get_minute_history(HealthMinuteData *minute_data, uint32_t max_records, time_t *time_start, time_t *time_end)
AppMessageInboxDropped
void(* AppMessageInboxDropped)(AppMessageResult reason, void *context)
Definition: pebble.h:2255
LayerUpdateProc
void(* LayerUpdateProc)(struct Layer *layer, GContext *ctx)
Definition: pebble.h:5062
accel_data_service_subscribe
void accel_data_service_subscribe(uint32_t samples_per_update, AccelDataHandler handler)
HealthMetricSleepSeconds
@ HealthMetricSleepSeconds
The number of seconds spent sleeping.
Definition: pebble.h:867
AnimationStartedHandler
void(* AnimationStartedHandler)(Animation *animation, void *context)
Definition: pebble.h:5757
APP_LAUNCH_USER
@ APP_LAUNCH_USER
App launched by user selection in launcher menu.
Definition: pebble.h:3135
menu_layer_pad_bottom_enable
void menu_layer_pad_bottom_enable(MenuLayer *menu_layer, bool enable)
SmartstrapReadHandler
void(* SmartstrapReadHandler)(SmartstrapAttribute *attribute, SmartstrapResult result, const uint8_t *data, size_t length)
Definition: pebble.h:4839
GAlignTop
@ GAlignTop
Align by making the top edges overlap and centered horizontally.
Definition: pebble.h:3721
GPath
struct GPath GPath
AppGlanceSlice
struct AppGlanceSlice AppGlanceSlice
scroll_layer_add_child
void scroll_layer_add_child(ScrollLayer *scroll_layer, Layer *child)
HealthEventType
HealthEventType
Health event enum. Passed into the HealthEventHandler.
Definition: pebble.h:1154
APP_WORKER_RESULT_ASKING_CONFIRMATION
@ APP_WORKER_RESULT_ASKING_CONFIRMATION
The user will be asked for confirmation.
Definition: pebble.h:2752
action_bar_layer_add_to_window
void action_bar_layer_add_to_window(ActionBarLayer *action_bar, struct Window *window)
health_service_any_activity_accessible
HealthServiceAccessibilityMask health_service_any_activity_accessible(HealthActivityMask activity_mask, time_t time_start, time_t time_end)
ScrollLayerCallbacks::click_config_provider
ClickConfigProvider click_config_provider
Definition: pebble.h:6575
launch_get_args
uint32_t launch_get_args(void)
graphics_frame_buffer_is_captured
bool graphics_frame_buffer_is_captured(GContext *ctx)
action_bar_layer_set_icon_press_animation
void action_bar_layer_set_icon_press_animation(ActionBarLayer *action_bar, ButtonId button_id, ActionBarLayerIconPressAnimation animation)
AccelDataHandler
void(* AccelDataHandler)(AccelData *data, uint32_t num_samples)
Definition: pebble.h:646
app_glance_add_slice
AppGlanceResult app_glance_add_slice(AppGlanceReloadSession *session, AppGlanceSlice slice)
WATCH_INFO_COLOR_WHITE
@ WATCH_INFO_COLOR_WHITE
White.
Definition: pebble.h:225
WATCH_INFO_COLOR_PEBBLE_TIME_2_BLACK
@ WATCH_INFO_COLOR_PEBBLE_TIME_2_BLACK
Pebble Time 2, Black.
Definition: pebble.h:260
dict_write_cstring
DictionaryResult dict_write_cstring(DictionaryIterator *iter, const uint32_t key, const char *const cstring)
gdraw_command_image_get_bounds_size
GSize gdraw_command_image_get_bounds_size(GDrawCommandImage *image)
HealthMetricActiveSeconds
@ HealthMetricActiveSeconds
The number of seconds spent active (i.e. not resting).
Definition: pebble.h:863
AnimationCurveCustomFunction
@ AnimationCurveCustomFunction
Custom (user-provided) animation curve.
Definition: pebble.h:5552
text_layer_create
TextLayer * text_layer_create(GRect frame)
animation_get_delay
uint32_t animation_get_delay(Animation *animation)
__attribute__
struct __attribute__((__packed__)) AccelData
A single accelerometer sample for all three axes.
Definition: pebble.h:605
ResHandle
void * ResHandle
Definition: pebble.h:2672
animation_spawn_create
Animation * animation_spawn_create(Animation *animation_a, Animation *animation_b, Animation *animation_c,...)
graphics_text_attributes_create
GTextAttributes * graphics_text_attributes_create(void)
APP_WORKER_RESULT_ALREADY_RUNNING
@ APP_WORKER_RESULT_ALREADY_RUNNING
The worker is already running.
Definition: pebble.h:2750
GDrawCommandListIteratorCb
bool(* GDrawCommandListIteratorCb)(GDrawCommand *command, uint32_t index, void *context)
Definition: pebble.h:4225
accel_service_set_sampling_rate
int accel_service_set_sampling_rate(AccelSamplingRate rate)
preferred_result_display_duration
uint32_t preferred_result_display_duration(void)
wakeup_schedule
WakeupId wakeup_schedule(time_t timestamp, int32_t cookie, bool notify_if_missed)
health_service_peek_current_activities
HealthActivityMask health_service_peek_current_activities(void)
WEDNESDAY
@ WEDNESDAY
Wednesday.
Definition: pebble.h:340
GRect::size
GSize size
The size of the rectangle.
Definition: pebble.h:3361
menu_index_compare
int16_t menu_index_compare(const MenuIndex *a, const MenuIndex *b)
WATCH_INFO_COLOR_TIME_ROUND_BLACK_14
@ WATCH_INFO_COLOR_TIME_ROUND_BLACK_14
Time Round 14mm lug size, Black.
Definition: pebble.h:246
ScrollLayerCallbacks
struct ScrollLayerCallbacks ScrollLayerCallbacks
HealthActivityNone
@ HealthActivityNone
No special activity.
Definition: pebble.h:1023
health_service_sum_averaged
HealthValue health_service_sum_averaged(HealthMetric metric, time_t time_start, time_t time_end, HealthServiceTimeScope scope)
light_enable
void light_enable(bool enable)
animation_set_duration
bool animation_set_duration(Animation *animation, uint32_t duration_ms)
app_message_register_inbox_received
AppMessageInboxReceived app_message_register_inbox_received(AppMessageInboxReceived received_callback)
WATCH_INFO_MODEL_PEBBLE_TIME_ROUND_14
@ WATCH_INFO_MODEL_PEBBLE_TIME_ROUND_14
Pebble Time Round, 14mm lug size.
Definition: pebble.h:212
APP_MSG_BUFFER_OVERFLOW
@ APP_MSG_BUFFER_OVERFLOW
(128) The buffer was too small to contain the incoming message.
Definition: pebble.h:2186
animation_sequence_create_from_array
Animation * animation_sequence_create_from_array(Animation **animation_array, uint32_t array_len)
GSize
Represents a 2-dimensional size.
Definition: pebble.h:3336
Tuplet::data
const uint8_t * data
Pointer to the data.
Definition: pebble.h:1840
status_bar_layer_set_separator_mode
void status_bar_layer_set_separator_mode(StatusBarLayer *status_bar_layer, StatusBarLayerSeparatorMode mode)
graphics_capture_frame_buffer
GBitmap * graphics_capture_frame_buffer(GContext *ctx)
gbitmap_create_blank_with_palette
GBitmap * gbitmap_create_blank_with_palette(GSize size, GBitmapFormat format, GColor *palette, bool free_on_destroy)
GRect::origin
GPoint origin
The coordinate of the upper-lefthand corner point of the rectangle.
Definition: pebble.h:3359
Tuplet::cstring
struct Tuplet::@0::@3 cstring
Valid when .type. is TUPLE_CSTRING.
simple_menu_layer_get_selected_index
int simple_menu_layer_get_selected_index(const SimpleMenuLayer *simple_menu)
HealthAggregationSum
@ HealthAggregationSum
Definition: pebble.h:960
AppLogLevel
AppLogLevel
Suggested log level values.
Definition: pebble.h:1519
GCornersLeft
@ GCornersLeft
Left corners.
Definition: pebble.h:3973
E_INVALID_ARGUMENT
@ E_INVALID_ARGUMENT
The function was not called correctly.
Definition: pebble.h:2940
WATCH_INFO_MODEL_PEBBLE_TIME_ROUND_20
@ WATCH_INFO_MODEL_PEBBLE_TIME_ROUND_20
Pebble Time Round, 20mm lug size.
Definition: pebble.h:213
UnobstructedAreaHandlers::did_change
UnobstructedAreaDidChangeHandler did_change
Handler that will be called after the unobstructed area has finished changing.
Definition: pebble.h:6385
GCompOpClear
@ GCompOpClear
Definition: pebble.h:3790
action_menu_item_get_label
char * action_menu_item_get_label(const ActionMenuItem *item)
MenuLayerCallbacks
struct MenuLayerCallbacks MenuLayerCallbacks
Data structure containing all the callbacks of a MenuLayer.
E_UNKNOWN
@ E_UNKNOWN
No idea what went wrong.
Definition: pebble.h:2934
text_layer_set_font
void text_layer_set_font(TextLayer *text_layer, GFont font)
GCompOpOr
@ GCompOpOr
Definition: pebble.h:3777
dictation_session_destroy
void dictation_session_destroy(DictationSession *session)
GCompOpSet
@ GCompOpSet
Definition: pebble.h:3796
WATCH_INFO_COLOR_TIME_ROUND_SILVER_20
@ WATCH_INFO_COLOR_TIME_ROUND_SILVER_20
Time Round 20mm lug size, Silver.
Definition: pebble.h:247
HealthEventSleepUpdate
@ HealthEventSleepUpdate
Definition: pebble.h:1164
menu_layer_set_selected_next
void menu_layer_set_selected_next(MenuLayer *menu_layer, bool up, MenuRowAlign scroll_align, bool animated)
app_message_get_context
void * app_message_get_context(void)
gdraw_command_sequence_create_with_resource
GDrawCommandSequence * gdraw_command_sequence_create_with_resource(uint32_t resource_id)
time_ms
uint16_t time_ms(time_t *t_utc, uint16_t *out_ms)
vibes_enqueue_custom_pattern
void vibes_enqueue_custom_pattern(VibePattern pattern)
MenuIndex::section
uint16_t section
The index of the section.
Definition: pebble.h:6877
APP_WORKER_RESULT_SUCCESS
@ APP_WORKER_RESULT_SUCCESS
Success.
Definition: pebble.h:2742
simple_menu_layer_get_layer
Layer * simple_menu_layer_get_layer(const SimpleMenuLayer *simple_menu)
PropertyAnimationAccessors::getter
union PropertyAnimationAccessors::@12 getter
layer_convert_rect_to_screen
GRect layer_convert_rect_to_screen(const Layer *layer, GRect rect)
Int16Setter
void(* Int16Setter)(void *subject, int16_t int16)
Definition: pebble.h:6121
HealthActivityRun
@ HealthActivityRun
The 'run' activity.
Definition: pebble.h:1031
HealthIterationDirectionFuture
@ HealthIterationDirectionFuture
Iterate into the future.
Definition: pebble.h:1060
HealthMinuteData::vmc
uint16_t vmc
Vector Magnitude Counts (vmc).
Definition: pebble.h:1263
tm::tm_sec
int tm_sec
Definition: pebble.h:8312
AccelSamplingRate
AccelSamplingRate
Valid accelerometer sampling rates, in Hz.
Definition: pebble.h:660
app_event_loop
void app_event_loop(void)
scroll_layer_get_content_indicator
ContentIndicator * scroll_layer_get_content_indicator(ScrollLayer *scroll_layer)
menu_cell_basic_header_draw
void menu_cell_basic_header_draw(GContext *ctx, const Layer *cell_layer, const char *title)
GEdgeInsets
Definition: pebble.h:3804
HealthIterationDirectionPast
@ HealthIterationDirectionPast
Iterate into the past.
Definition: pebble.h:1058
PropertyAnimationImplementation::base
AnimationImplementation base
The "inherited" fields from the Animation "base class".
Definition: pebble.h:6218
MenuLayerGetHeaderHeightCallback
int16_t(* MenuLayerGetHeaderHeightCallback)(struct MenuLayer *menu_layer, uint16_t section_index, void *callback_context)
Definition: pebble.h:6945
animation_set_handlers
bool animation_set_handlers(Animation *animation, AnimationHandlers callbacks, void *context)
health_service_get_measurement_system_for_display
MeasurementSystem health_service_get_measurement_system_for_display(HealthMetric metric)
data_logging_log
DataLoggingResult data_logging_log(DataLoggingSessionRef logging_session, const void *data, uint32_t num_items)
vibes_cancel
void vibes_cancel(void)
graphics_fill_rect
void graphics_fill_rect(GContext *ctx, GRect rect, uint16_t corner_radius, GCornerMask corner_mask)
DataLoggingItemType
DataLoggingItemType
Definition: pebble.h:1365
app_focus_service_subscribe_handlers
void app_focus_service_subscribe_handlers(AppFocusHandlers handlers)
layer_insert_above_sibling
void layer_insert_above_sibling(Layer *layer_to_insert, Layer *above_sibling_layer)
status_bar_layer_destroy
void status_bar_layer_destroy(StatusBarLayer *status_bar_layer)
SmartstrapResultNotPresent
@ SmartstrapResultNotPresent
The smartstrap port is not present on this watch.
Definition: pebble.h:4804
GOvalScaleMode
GOvalScaleMode
Definition: pebble.h:4099
APP_MSG_CLOSED
@ APP_MSG_CLOSED
(8192) App message was closed.
Definition: pebble.h:2202
animation_spawn_create_from_array
Animation * animation_spawn_create_from_array(Animation **animation_array, uint32_t array_len)
UnobstructedAreaHandlers::change
UnobstructedAreaChangeHandler change
Handler that will be called every time the unobstructed area changes.
Definition: pebble.h:6383
GPointReturn
GPoint GPointReturn
Definition: pebble.h:6112
HealthEventSignificantUpdate
@ HealthEventSignificantUpdate
Definition: pebble.h:1158
UnobstructedAreaChangeHandler
void(* UnobstructedAreaChangeHandler)(AnimationProgress progress, void *context)
Definition: pebble.h:6373
S_NO_ACTION_REQUIRED
@ S_NO_ACTION_REQUIRED
No action was taken as none was required.
Definition: pebble.h:2976
GDrawCommandImage
struct GDrawCommandImage GDrawCommandImage
Definition: pebble.h:4215
scroll_layer_scroll_up_click_handler
void scroll_layer_scroll_up_click_handler(ClickRecognizerRef recognizer, void *context)
scroll_layer_destroy
void scroll_layer_destroy(ScrollLayer *scroll_layer)
Destroys a ScrollLayer previously created by scroll_layer_create.
PreferredContentSize
PreferredContentSize
Definition: pebble.h:8255
GAlign
GAlign
Definition: pebble.h:3713
animation_set_custom_curve
bool animation_set_custom_curve(Animation *animation, AnimationCurveFunction curve_function)
GPathInfo::num_points
uint32_t num_points
The number of points in the points array.
Definition: pebble.h:4522
graphics_draw_bitmap_in_rect
void graphics_draw_bitmap_in_rect(GContext *ctx, const GBitmap *bitmap, GRect rect)
AppExitReason
AppExitReason
Definition: pebble.h:3168
tm::tm_zone
char tm_zone[TZ_LEN]
Definition: pebble.h:8323
text_layer_get_layer
Layer * text_layer_get_layer(TextLayer *text_layer)
action_menu_close
void action_menu_close(ActionMenu *action_menu, bool animated)
GBitmapDataRowInfo::max_x
int16_t max_x
Definition: pebble.h:3697
scroll_layer_set_click_config_onto_window
void scroll_layer_set_click_config_onto_window(ScrollLayer *scroll_layer, struct Window *window)
action_menu_level_add_child
ActionMenuItem * action_menu_level_add_child(ActionMenuLevel *level, ActionMenuLevel *child, const char *label)
animation_destroy
bool animation_destroy(Animation *animation)
graphics_draw_line
void graphics_draw_line(GContext *ctx, GPoint p0, GPoint p1)
AppGlanceSlice
Definition: pebble.h:3199
SUNDAY
@ SUNDAY
Sunday.
Definition: pebble.h:337
simple_menu_layer_destroy
void simple_menu_layer_destroy(SimpleMenuLayer *menu_layer)
Destroys a SimpleMenuLayer previously created by simple_menu_layer_create.
PropertyAnimationAccessors::gcolor8
GColor8Getter gcolor8
Use if the property to animate is of GColor8 type.
Definition: pebble.h:6207
click_recognizer_is_repeating
bool click_recognizer_is_repeating(ClickRecognizerRef recognizer)
APP_MSG_SEND_REJECTED
@ APP_MSG_SEND_REJECTED
(4) The other end rejected the sent data, with a "nack" reply.
Definition: pebble.h:2170
tm::tm_mon
int tm_mon
Definition: pebble.h:8316
graphics_text_layout_get_content_size_with_attributes
GSize graphics_text_layout_get_content_size_with_attributes(const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, GTextAttributes *text_attributes)
WATCH_INFO_MODEL_PEBBLE_2_HR
@ WATCH_INFO_MODEL_PEBBLE_2_HR
Pebble 2 HR.
Definition: pebble.h:214
Int16Getter
int16_t(* Int16Getter)(void *subject)
Definition: pebble.h:6127
GPoint
#define GPoint(x, y)
Convenience macro to make a GPoint.
Definition: pebble.h:3324
app_worker_message_subscribe
bool app_worker_message_subscribe(AppWorkerMessageHandler handler)
CompassHeadingData
Structure containing a single heading towards magnetic and true north.
Definition: pebble.h:758
GColor8::g
uint8_t g
Green.
Definition: pebble.h:3272
number_window_create
NumberWindow * number_window_create(const char *label, NumberWindowCallbacks callbacks, void *callback_context)
DATA_LOGGING_SUCCESS
@ DATA_LOGGING_SUCCESS
Successful operation.
Definition: pebble.h:1378
tm::tm_mday
int tm_mday
Definition: pebble.h:8315
NumberWindowCallbacks
Data structure containing all the callbacks for a NumberWindow.
Definition: pebble.h:7923
AppSync
Definition: pebble.h:2478
scroll_layer_set_shadow_hidden
void scroll_layer_set_shadow_hidden(ScrollLayer *scroll_layer, bool hidden)
WATCH_INFO_COLOR_STAINLESS_STEEL
@ WATCH_INFO_COLOR_STAINLESS_STEEL
Stainless Steel.
Definition: pebble.h:230
gbitmap_sequence_get_total_num_frames
uint32_t gbitmap_sequence_get_total_num_frames(GBitmapSequence *bitmap_sequence)
WATCH_INFO_COLOR_TIME_ROUND_SILVER_14
@ WATCH_INFO_COLOR_TIME_ROUND_SILVER_14
Time Round 14mm lug size, Silver.
Definition: pebble.h:245
scroll_layer_set_paging
void scroll_layer_set_paging(ScrollLayer *scroll_layer, bool paging_enabled)
persist_read_data
int persist_read_data(const uint32_t key, void *buffer, const size_t buffer_size)
app_sync_set
AppMessageResult app_sync_set(struct AppSync *s, const Tuplet *const keys_and_values_to_update, const uint8_t count)
persist_get_size
int persist_get_size(const uint32_t key)
sin_lookup
int32_t sin_lookup(int32_t angle)
GTextAlignment
GTextAlignment
Definition: pebble.h:4676
HealthServiceTimeScopeDaily
@ HealthServiceTimeScopeDaily
Compute average across all days of the week.
Definition: pebble.h:923
menu_layer_set_click_config_onto_window
void menu_layer_set_click_config_onto_window(MenuLayer *menu_layer, struct Window *window)
ContentIndicatorConfig::layer
Layer * layer
The layer where the arrow indicator will be rendered when content is available.
Definition: pebble.h:6753
AppGlanceReloadCallback
void(* AppGlanceReloadCallback)(AppGlanceReloadSession *session, size_t limit, void *context)
Definition: pebble.h:3247
SmartstrapServiceId
uint16_t SmartstrapServiceId
A type representing a smartstrap ServiceId.
Definition: pebble.h:4817
MenuRowAlignCenter
@ MenuRowAlignCenter
Definition: pebble.h:7210
click_recognizer_get_button_id
ButtonId click_recognizer_get_button_id(ClickRecognizerRef recognizer)
smartstrap_attribute_get_attribute_id
SmartstrapAttributeId smartstrap_attribute_get_attribute_id(SmartstrapAttribute *attribute)
WatchInfoVersion::patch
uint8_t patch
Patch version number.
Definition: pebble.h:273
WATCH_INFO_COLOR_TIME_WHITE
@ WATCH_INFO_COLOR_TIME_WHITE
Time White.
Definition: pebble.h:237
scroll_layer_get_content_size
GSize scroll_layer_get_content_size(const ScrollLayer *scroll_layer)
text_layer_get_content_size
GSize text_layer_get_content_size(TextLayer *text_layer)
TUPLE_INT
@ TUPLE_INT
Definition: pebble.h:1652
gdraw_command_get_point
GPoint gdraw_command_get_point(GDrawCommand *command, uint16_t point_idx)
AppLaunchReason
AppLaunchReason
Definition: pebble.h:3133
rot_bitmap_set_src_ic
void rot_bitmap_set_src_ic(RotBitmapLayer *bitmap, GPoint ic)
gdraw_command_get_stroke_width
uint8_t gdraw_command_get_stroke_width(GDrawCommand *command)
accel_service_set_samples_per_update
int accel_service_set_samples_per_update(uint32_t num_samples)
gbitmap_create_from_png_data
GBitmap * gbitmap_create_from_png_data(const uint8_t *png_data, size_t png_data_size)
SimpleMenuSection
Data structure containing the information of a menu section.
Definition: pebble.h:7372
menu_layer_is_index_selected
bool menu_layer_is_index_selected(const MenuLayer *menu_layer, MenuIndex *index)
PropertyAnimationAccessors::int16
Int16Getter int16
Use if the property to animate is of int16_t type.
Definition: pebble.h:6201
menu_layer_get_center_focused
bool menu_layer_get_center_focused(MenuLayer *menu_layer)
tm::tm_hour
int tm_hour
Definition: pebble.h:8314
BatteryChargeState
Structure for retrieval of the battery charge state.
Definition: pebble.h:562
APP_LAUNCH_PHONE
@ APP_LAUNCH_PHONE
App launched by mobile or companion app.
Definition: pebble.h:3136
gbitmap_get_data
uint8_t * gbitmap_get_data(const GBitmap *bitmap)
window_set_background_color
void window_set_background_color(Window *window, GColor background_color)
MenuLayerCallbacks::selection_changed
MenuLayerSelectionChangedCallback selection_changed
Definition: pebble.h:7115
app_sync_init
void app_sync_init(struct AppSync *s, uint8_t *buffer, const uint16_t buffer_size, const Tuplet *const keys_and_initial_values, const uint8_t count, AppSyncTupleChangedCallback tuple_changed_callback, AppSyncErrorCallback error_callback, void *context)
ScrollLayerCallback
void(* ScrollLayerCallback)(struct ScrollLayer *scroll_layer, void *context)
Function signature for the .content_offset_changed_handler callback.
Definition: pebble.h:6564
property_animation_update_int16
void property_animation_update_int16(PropertyAnimation *property_animation, const uint32_t distance_normalized)
graphics_context_set_stroke_color
void graphics_context_set_stroke_color(GContext *ctx, GColor color)
GDrawCommandTypePath
@ GDrawCommandTypePath
Arbitrary path draw command type.
Definition: pebble.h:4234
cos_lookup
int32_t cos_lookup(int32_t angle)
MeasurementSystemMetric
@ MeasurementSystemMetric
The metric measurement system.
Definition: pebble.h:1303
TupleType
TupleType
Values representing the type of data that the value field of a Tuple contains.
Definition: pebble.h:1642
StatusBarLayerSeparatorModeNone
@ StatusBarLayerSeparatorModeNone
The default mode. No separator will be shown.
Definition: pebble.h:7660
gdraw_command_set_point
void gdraw_command_set_point(GDrawCommand *command, uint16_t point_idx, GPoint point)
gdraw_command_draw
void gdraw_command_draw(GContext *ctx, GDrawCommand *command)
rot_bitmap_layer_set_corner_clip_color
void rot_bitmap_layer_set_corner_clip_color(RotBitmapLayer *bitmap, GColor color)
DataLoggingResult
DataLoggingResult
Enumerated values describing the possible outcomes of data logging operations.
Definition: pebble.h:1377
MenuLayerCallbacks::select_click
MenuLayerSelectCallback select_click
Definition: pebble.h:7106
health_service_peek_current_value
HealthValue health_service_peek_current_value(HealthMetric metric)
action_bar_layer_set_icon
void action_bar_layer_set_icon(ActionBarLayer *action_bar, ButtonId button_id, const GBitmap *icon)
MeasurementSystemImperial
@ MeasurementSystemImperial
The imperial measurement system.
Definition: pebble.h:1305
pebble_sdk_version.h
MenuRowAlignNone
@ MenuRowAlignNone
Don't align or update the scroll offset of the MenuLayer.
Definition: pebble.h:7206
resource_size
size_t resource_size(ResHandle h)
HealthAggregationMin
@ HealthAggregationMin
Definition: pebble.h:966
GBitmapDataRowInfo::min_x
int16_t min_x
The absolute column of a first valid pixel for a given data row.
Definition: pebble.h:3693
PropertyAnimationAccessors::gcolor8
GColor8Setter gcolor8
Use if the property to animate is of GColor8 type.
Definition: pebble.h:6191
WakeupHandler
void(* WakeupHandler)(WakeupId wakeup_id, int32_t cookie)
Definition: pebble.h:3070
GCornersRight
@ GCornersRight
Right corners.
Definition: pebble.h:3975
CompassHeadingData::is_declination_valid
bool is_declination_valid
Currently always false (reserved for future implementation).
Definition: pebble.h:768
gdraw_command_frame_set_duration
void gdraw_command_frame_set_duration(GDrawCommandFrame *frame, uint32_t duration)
S_SUCCESS
@ S_SUCCESS
Operation completed successfully.
Definition: pebble.h:2928
bitmap_layer_set_bitmap
void bitmap_layer_set_bitmap(BitmapLayer *bitmap_layer, const GBitmap *bitmap)
PropertyAnimationAccessors::grect
GRectSetter grect
Use if the property to animate is of GRect type.
Definition: pebble.h:6189
APP_WORKER_RESULT_NO_WORKER
@ APP_WORKER_RESULT_NO_WORKER
No worker found for the current app.
Definition: pebble.h:2744
APP_GLANCE_RESULT_TEMPLATE_STRING_TOO_LONG
@ APP_GLANCE_RESULT_TEMPLATE_STRING_TOO_LONG
The subtitle_template_string provided in the slice was longer than 150 bytes.
Definition: pebble.h:3221
GPoint::y
int16_t y
The y-coordinate.
Definition: pebble.h:3320
bitmap_layer_get_layer
Layer * bitmap_layer_get_layer(const BitmapLayer *bitmap_layer)
UInt32Setter
void(* UInt32Setter)(void *subject, uint32_t uint32)
Definition: pebble.h:6132
WATCH_INFO_COLOR_PINK
@ WATCH_INFO_COLOR_PINK
Pink.
Definition: pebble.h:235
dict_serialize_tuplets_to_buffer
DictionaryResult dict_serialize_tuplets_to_buffer(const Tuplet *const tuplets, const uint8_t tuplets_count, uint8_t *buffer, uint32_t *size_in_out)
app_comm_get_sniff_interval
SniffInterval app_comm_get_sniff_interval(void)
ActionMenuConfig::foreground
GColor foreground
the color of the individual "crumbs" that indicate menu depth
Definition: pebble.h:8046
property_animation_destroy
void property_animation_destroy(PropertyAnimation *property_animation)
grect_inset
GRect grect_inset(GRect rect, GEdgeInsets insets)
app_message_set_context
void * app_message_set_context(void *context)
ClickConfigProvider
void(* ClickConfigProvider)(void *context)
Definition: pebble.h:4990
WatchInfoVersion
Definition: pebble.h:270
AnimationImplementation::update
AnimationUpdateImplementation update
Definition: pebble.h:5902
UnobstructedAreaDidChangeHandler
void(* UnobstructedAreaDidChangeHandler)(void *context)
Definition: pebble.h:6377
gbitmap_sequence_create_with_resource
GBitmapSequence * gbitmap_sequence_create_with_resource(uint32_t resource_id)
text_layer_set_text
void text_layer_set_text(TextLayer *text_layer, const char *text)
SATURDAY
@ SATURDAY
Saturday.
Definition: pebble.h:343
CompassStatusCalibrated
@ CompassStatusCalibrated
Compass data is valid and the calibration has completed.
Definition: pebble.h:747
NUM_BUTTONS
@ NUM_BUTTONS
Total number of buttons.
Definition: pebble.h:170
health_service_sum
HealthValue health_service_sum(HealthMetric metric, time_t time_start, time_t time_end)
APP_LOG_LEVEL_DEBUG_VERBOSE
@ APP_LOG_LEVEL_DEBUG_VERBOSE
Verbose Debug level log message.
Definition: pebble.h:1529
APP_MSG_INVALID_STATE
@ APP_MSG_INVALID_STATE
(32768) The function was called while App Message was not in the appropriate state.
Definition: pebble.h:2208
layer_set_bounds
void layer_set_bounds(Layer *layer, GRect bounds)
DictionarySerializeCallback
void(* DictionarySerializeCallback)(const uint8_t *const data, const uint16_t size, void *context)
Definition: pebble.h:1886
WATCH_INFO_COLOR_UNKNOWN
@ WATCH_INFO_COLOR_UNKNOWN
Unknown color.
Definition: pebble.h:223
graphics_context_set_stroke_width
void graphics_context_set_stroke_width(GContext *ctx, uint8_t stroke_width)
property_animation_create_bounds_origin
PropertyAnimation * property_animation_create_bounds_origin(struct Layer *layer, GPoint *from, GPoint *to)
DictionaryIterator
Definition: pebble.h:1705
action_menu_unfreeze
void action_menu_unfreeze(ActionMenu *action_menu)
clock_copy_time_string
void clock_copy_time_string(char *buffer, uint8_t size)
heap_bytes_used
size_t heap_bytes_used(void)
app_message_outbox_begin
AppMessageResult app_message_outbox_begin(DictionaryIterator **iterator)
GBitmapFormat
GBitmapFormat
The format of a GBitmap can either be 1-bit or 8-bit.
Definition: pebble.h:3428
MenuLayerGetCellHeightCallback
int16_t(* MenuLayerGetCellHeightCallback)(struct MenuLayer *menu_layer, MenuIndex *cell_index, void *callback_context)
Definition: pebble.h:6932
GEdgeInsets::bottom
int16_t bottom
The inset at the bottom of an object.
Definition: pebble.h:3810
WATCH_INFO_COLOR_TIME_STEEL_GOLD
@ WATCH_INFO_COLOR_TIME_STEEL_GOLD
Time Steel Gold.
Definition: pebble.h:243
persist_write_int
status_t persist_write_int(const uint32_t key, const int32_t value)
AppGlanceResult
AppGlanceResult
Bitfield enum describing the result of trying to add an AppGlanceSlice to an app's glance.
Definition: pebble.h:3215
resource_get_handle
ResHandle resource_get_handle(uint32_t resource_id)
tm::tm_isdst
int tm_isdst
Definition: pebble.h:8320
property_animation_subject
bool property_animation_subject(PropertyAnimation *property_animation, void **subject, bool set)
DATA_LOGGING_FULL
@ DATA_LOGGING_FULL
No more space to save data.
Definition: pebble.h:1380
DICT_NOT_ENOUGH_STORAGE
@ DICT_NOT_ENOUGH_STORAGE
There was not enough backing storage to complete the operation.
Definition: pebble.h:1631
animation_sequence_create
Animation * animation_sequence_create(Animation *animation_a, Animation *animation_b, Animation *animation_c,...)
property_animation_update_gpoint
void property_animation_update_gpoint(PropertyAnimation *property_animation, const uint32_t distance_normalized)
AppSyncErrorCallback
void(* AppSyncErrorCallback)(DictionaryResult dict_error, AppMessageResult app_message_error, void *context)
Definition: pebble.h:2475
ContentIndicatorConfig::alignment
GAlign alignment
The alignment of the arrow within the provided layer.
Definition: pebble.h:6755
text_layer_restore_default_text_flow_and_paging
void text_layer_restore_default_text_flow_and_paging(TextLayer *text_layer)
layer_insert_below_sibling
void layer_insert_below_sibling(Layer *layer_to_insert, Layer *below_sibling_layer)
PropertyAnimationAccessors::uint32
UInt32Setter uint32
Use if the property to animate is of uint32_t type.
Definition: pebble.h:6193
Tuplet
Definition: pebble.h:1827
YEAR_UNIT
@ YEAR_UNIT
Flag to represent the "years" time unit.
Definition: pebble.h:827
rot_bitmap_layer_increment_angle
void rot_bitmap_layer_increment_angle(RotBitmapLayer *bitmap, int32_t angle_change)
APP_LOG_LEVEL_INFO
@ APP_LOG_LEVEL_INFO
Info level log message.
Definition: pebble.h:1525
compass_service_unsubscribe
void compass_service_unsubscribe(void)
WATCH_INFO_COLOR_MATTE_BLACK
@ WATCH_INFO_COLOR_MATTE_BLACK
Matte Black.
Definition: pebble.h:231
APP_GLANCE_RESULT_INVALID_TEMPLATE_STRING
@ APP_GLANCE_RESULT_INVALID_TEMPLATE_STRING
The subtitle_template_string provided in the slice was invalid.
Definition: pebble.h:3219
GEdgeInsets::top
int16_t top
The inset at the top of an object.
Definition: pebble.h:3806
APP_WORKER_RESULT_DIFFERENT_APP
@ APP_WORKER_RESULT_DIFFERENT_APP
A worker for a different app is already running.
Definition: pebble.h:2746
HealthServiceAccessibilityMaskAvailable
@ HealthServiceAccessibilityMaskAvailable
Return values are available and represent the collected health information.
Definition: pebble.h:1083
CompassHeadingHandler
void(* CompassHeadingHandler)(CompassHeadingData heading)
Definition: pebble.h:773
AppFocusHandlers::will_focus
AppFocusHandler will_focus
Definition: pebble.h:512
MenuRowAlignBottom
@ MenuRowAlignBottom
Definition: pebble.h:7218
AppMessageResult
AppMessageResult
AppMessage result codes.
Definition: pebble.h:2162
dict_write_uint8
DictionaryResult dict_write_uint8(DictionaryIterator *iter, const uint32_t key, const uint8_t value)
TimeUnits
TimeUnits
Definition: pebble.h:815
ACCEL_SAMPLING_10HZ
@ ACCEL_SAMPLING_10HZ
10 HZ sampling rate
Definition: pebble.h:662
rot_bitmap_layer_destroy
void rot_bitmap_layer_destroy(RotBitmapLayer *bitmap)
WATCH_INFO_COLOR_PEBBLE_2_SE_WHITE
@ WATCH_INFO_COLOR_PEBBLE_2_SE_WHITE
Pebble 2 SE, White / Gray.
Definition: pebble.h:258
gdraw_command_sequence_get_num_frames
uint32_t gdraw_command_sequence_get_num_frames(GDrawCommandSequence *sequence)
battery_state_service_subscribe
void battery_state_service_subscribe(BatteryStateHandler handler)
text_layer_enable_screen_text_flow_and_paging
void text_layer_enable_screen_text_flow_and_paging(TextLayer *text_layer, uint8_t inset)
GCompOpAssign
@ GCompOpAssign
Definition: pebble.h:3765
layer_mark_dirty
void layer_mark_dirty(Layer *layer)
DictionaryIterator::dictionary
Dictionary * dictionary
The dictionary being iterated.
Definition: pebble.h:1706
SniffInterval
SniffInterval
Definition: pebble.h:2817
MenuIndex::row
uint16_t row
The index of the row within the section with index .section
Definition: pebble.h:6879
SimpleMenuSection::items
const SimpleMenuItem * items
Array of items in the section.
Definition: pebble.h:7376
window_set_user_data
void window_set_user_data(Window *window, void *data)
MenuLayerCallbacks::get_cell_height
MenuLayerGetCellHeightCallback get_cell_height
Definition: pebble.h:7082
gdraw_command_get_num_points
uint16_t gdraw_command_get_num_points(GDrawCommand *command)
Get the number of points in a command.
HealthServiceTimeScopeWeekly
@ HealthServiceTimeScopeWeekly
Definition: pebble.h:918
SimpleMenuItem::callback
SimpleMenuLayerSelectCallback callback
Definition: pebble.h:7368
GAlignLeft
@ GAlignLeft
Align by making the left edges overlap and centered vertically.
Definition: pebble.h:3723
ActionMenuConfig::did_close
ActionMenuDidCloseCb did_close
a callback used to cleanup memory after the menu has closed
Definition: pebble.h:8049
window_stack_push
void window_stack_push(Window *window, bool animated)
ActionMenuPerformActionCb
void(* ActionMenuPerformActionCb)(ActionMenu *action_menu, const ActionMenuItem *action, void *context)
Definition: pebble.h:8031
wakeup_query
bool wakeup_query(WakeupId wakeup_id, time_t *timestamp)
app_message_outbox_send
AppMessageResult app_message_outbox_send(void)
window_raw_click_subscribe
void window_raw_click_subscribe(ButtonId button_id, ClickHandler down_handler, ClickHandler up_handler, void *context)
MenuIndex
Definition: pebble.h:6875
APP_LAUNCH_TIMELINE_ACTION
@ APP_LAUNCH_TIMELINE_ACTION
App launched by user opening it from a pin.
Definition: pebble.h:3140
HealthMetricActiveKCalories
@ HealthMetricActiveKCalories
The number of kcal (Calories) burned while active.
Definition: pebble.h:873
GEdgeInsets::left
int16_t left
The inset at the left of an object.
Definition: pebble.h:3812
GCornerTopLeft
@ GCornerTopLeft
Top-Left corner.
Definition: pebble.h:3959
ContentIndicatorDirection
ContentIndicatorDirection
Definition: pebble.h:6744
property_animation_to
bool property_animation_to(PropertyAnimation *property_animation, void *to, size_t size, bool set)
window_set_window_handlers
void window_set_window_handlers(Window *window, WindowHandlers handlers)
UnobstructedAreaWillChangeHandler
void(* UnobstructedAreaWillChangeHandler)(GRect final_unobstructed_screen_area, void *context)
Definition: pebble.h:6367
layer_set_hidden
void layer_set_hidden(Layer *layer, bool hidden)
persist_exists
bool persist_exists(const uint32_t key)
MenuLayerCallbacks::get_header_height
MenuLayerGetHeaderHeightCallback get_header_height
Definition: pebble.h:7088
action_bar_layer_set_background_color
void action_bar_layer_set_background_color(ActionBarLayer *action_bar, GColor background_color)
APP_LAUNCH_SYSTEM
@ APP_LAUNCH_SYSTEM
App launched by the system.
Definition: pebble.h:3134
property_animation_create
PropertyAnimation * property_animation_create(const PropertyAnimationImplementation *implementation, void *subject, void *from_value, void *to_value)
WATCH_INFO_COLOR_GRAY
@ WATCH_INFO_COLOR_GRAY
Gray.
Definition: pebble.h:228
window_set_click_config_provider
void window_set_click_config_provider(Window *window, ClickConfigProvider click_config_provider)
graphics_draw_text
void graphics_draw_text(GContext *ctx, const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment, GTextAttributes *text_attributes)
gpath_destroy
void gpath_destroy(GPath *gpath)
Free a dynamically allocated gpath created with gpath_create()
gdraw_command_get_radius
uint16_t gdraw_command_get_radius(GDrawCommand *command)
gdraw_command_set_path_open
void gdraw_command_set_path_open(GDrawCommand *command, bool path_open)
compass_service_peek
int compass_service_peek(CompassHeadingData *data)
E_OUT_OF_RESOURCES
@ E_OUT_OF_RESOURCES
Insufficient resources available.
Definition: pebble.h:2949
gbitmap_sequence_destroy
void gbitmap_sequence_destroy(GBitmapSequence *bitmap_sequence)
GDrawCommandType
GDrawCommandType
Definition: pebble.h:4232
Tuplet::integer
struct Tuplet::@0::@4 integer
Valid when .type. is TUPLE_INT or TUPLE_UINT.
GOvalScaleModeFillCircle
@ GOvalScaleModeFillCircle
Definition: pebble.h:4104
gdraw_command_image_create_with_resource
GDrawCommandImage * gdraw_command_image_create_with_resource(uint32_t resource_id)
menu_layer_set_highlight_colors
void menu_layer_set_highlight_colors(MenuLayer *menu_layer, GColor background, GColor foreground)
gbitmap_sequence_update_bitmap_by_elapsed
bool gbitmap_sequence_update_bitmap_by_elapsed(GBitmapSequence *bitmap_sequence, GBitmap *bitmap, uint32_t elapsed_ms)
gpath_draw_filled
void gpath_draw_filled(GContext *ctx, GPath *path)
health_service_sum_today
HealthValue health_service_sum_today(HealthMetric metric)
grect_centered_from_polar
GRect grect_centered_from_polar(GRect rect, GOvalScaleMode scale_mode, int32_t angle, GSize size)
GDrawCommandFrame
struct GDrawCommandFrame GDrawCommandFrame
Definition: pebble.h:4211
app_timer_register
AppTimer * app_timer_register(uint32_t timeout_ms, AppTimerCallback callback, void *callback_data)
layer_create_with_data
Layer * layer_create_with_data(GRect frame, size_t data_size)
tick_timer_service_subscribe
void tick_timer_service_subscribe(TimeUnits tick_units, TickHandler handler)
WATCH_INFO_COLOR_TIME_RED
@ WATCH_INFO_COLOR_TIME_RED
Time Red.
Definition: pebble.h:239
ActionMenuConfig::root_level
const ActionMenuLevel * root_level
the root level of the ActionMenu
Definition: pebble.h:8042
grect_standardize
void grect_standardize(GRect *rect)
animation_get_implementation
const AnimationImplementation * animation_get_implementation(Animation *animation)
DictationSessionStatusFailureConnectivityError
@ DictationSessionStatusFailureConnectivityError
No BT or internet connection.
Definition: pebble.h:1994
gbitmap_create_palettized_from_1bit
GBitmap * gbitmap_create_palettized_from_1bit(const GBitmap *src_bitmap)
window_stack_contains_window
bool window_stack_contains_window(Window *window)
health_service_register_metric_alert
HealthMetricAlert * health_service_register_metric_alert(HealthMetric metric, HealthValue threshold)
AnimationHandlers::stopped
AnimationStoppedHandler stopped
The handler that will be called when an animation is stopped.
Definition: pebble.h:5779
AnimationUpdateImplementation
void(* AnimationUpdateImplementation)(Animation *animation, const AnimationProgress progress)
Definition: pebble.h:5869
difftime
double difftime(time_t end, time_t beginning) noexcept
graphics_draw_rotated_bitmap
void graphics_draw_rotated_bitmap(GContext *ctx, GBitmap *src, GPoint src_ic, int rotation, GPoint dest_ic)
AppFocusHandlers
Definition: pebble.h:506
NumberWindowCallbacks::incremented
NumberWindowCallback incremented
Definition: pebble.h:7926
connection_service_unsubscribe
void connection_service_unsubscribe(void)
launch_reason
AppLaunchReason launch_reason(void)
content_indicator_configure_direction
bool content_indicator_configure_direction(ContentIndicator *content_indicator, ContentIndicatorDirection direction, const ContentIndicatorConfig *config)
status_bar_layer_set_colors
void status_bar_layer_set_colors(StatusBarLayer *status_bar_layer, GColor background, GColor foreground)
HealthActivityOpenWorkout
@ HealthActivityOpenWorkout
The 'generic' activity.
Definition: pebble.h:1033
battery_state_service_peek
BatteryChargeState battery_state_service_peek(void)
gbitmap_get_bytes_per_row
uint16_t gbitmap_get_bytes_per_row(const GBitmap *bitmap)
action_menu_open
ActionMenu * action_menu_open(ActionMenuConfig *config)
text_layer_set_background_color
void text_layer_set_background_color(TextLayer *text_layer, GColor color)
dictation_session_enable_confirmation
void dictation_session_enable_confirmation(DictationSession *session, bool is_enabled)
GRectReturn
GRect GRectReturn
Definition: pebble.h:6116
health_service_activities_iterate
void health_service_activities_iterate(HealthActivityMask activity_mask, time_t time_start, time_t time_end, HealthIterationDirection direction, HealthActivityIteratorCB callback, void *context)
scroll_layer_set_frame
void scroll_layer_set_frame(ScrollLayer *scroll_layer, GRect frame)
number_window_get_window
Window * number_window_get_window(NumberWindow *numberwindow)
rot_bitmap_set_compositing_mode
void rot_bitmap_set_compositing_mode(RotBitmapLayer *bitmap, GCompOp mode)
persist_write_string
int persist_write_string(const uint32_t key, const char *cstring)
app_focus_service_subscribe
void app_focus_service_subscribe(AppFocusHandler handler)
app_message_outbox_size_maximum
uint32_t app_message_outbox_size_maximum(void)
HealthMetricStepCount
@ HealthMetricStepCount
The number of steps counted.
Definition: pebble.h:861
CompassHeadingData::true_heading
CompassHeading true_heading
Currently same value as magnetic_heading (reserved for future implementation).
Definition: pebble.h:764
AnimationProgress
int32_t AnimationProgress
Definition: pebble.h:5537
PropertyAnimationAccessors::setter
union PropertyAnimationAccessors::@11 setter
psleep
void psleep(int millis)
persist_write_data
int persist_write_data(const uint32_t key, const void *data, const size_t size)
animation_get_reverse
bool animation_get_reverse(Animation *animation)
persist_write_bool
status_t persist_write_bool(const uint32_t key, const bool value)
MONDAY
@ MONDAY
Monday.
Definition: pebble.h:338
DATA_LOGGING_INT
@ DATA_LOGGING_INT
Signed integer. This may be a 1, 2, or 4 byte integer depending on the item_length parameter.
Definition: pebble.h:1373
health_service_get_heart_rate_sample_period_expiration_sec
uint16_t health_service_get_heart_rate_sample_period_expiration_sec(void)
CompassStatusUnavailable
@ CompassStatusUnavailable
The Compass Service is unavailable.
Definition: pebble.h:740
GPathInfo::points
GPoint * points
Pointer to an array of points.
Definition: pebble.h:4524
SmartstrapResultAttributeUnsupported
@ SmartstrapResultAttributeUnsupported
The smartstrap reported that it does not support the requested attribute.
Definition: pebble.h:4811
SmartstrapServiceAvailabilityHandler
void(* SmartstrapServiceAvailabilityHandler)(SmartstrapServiceId service_id, bool is_available)
Definition: pebble.h:4829
dict_size
uint32_t dict_size(DictionaryIterator *iter)
SmartstrapAttributeId
uint16_t SmartstrapAttributeId
A type representing a smartstrap AttributeId.
Definition: pebble.h:4820
gbitmap_destroy
void gbitmap_destroy(GBitmap *bitmap)
app_worker_message_unsubscribe
bool app_worker_message_unsubscribe(void)
watch_info_get_firmware_version
WatchInfoVersion watch_info_get_firmware_version(void)
AnimationCurve
AnimationCurve
Definition: pebble.h:5541
app_timer_cancel
void app_timer_cancel(AppTimer *timer_handle)
HealthActivityRestfulSleep
@ HealthActivityRestfulSleep
The 'restful sleeping' activity.
Definition: pebble.h:1027
SimpleMenuLayerSelectCallback
void(* SimpleMenuLayerSelectCallback)(int index, void *context)
Definition: pebble.h:7356
gdraw_command_image_destroy
void gdraw_command_image_destroy(GDrawCommandImage *image)
action_menu_get_root_level
ActionMenuLevel * action_menu_get_root_level(ActionMenu *action_menu)
app_message_open
AppMessageResult app_message_open(const uint32_t size_inbound, const uint32_t size_outbound)
window_stack_remove
bool window_stack_remove(Window *window, bool animated)
HealthServiceAccessibilityMaskNotSupported
@ HealthServiceAccessibilityMaskNotSupported
Definition: pebble.h:1088
WindowHandlers
Definition: pebble.h:5291
gcolor_legible_over
GColor8 gcolor_legible_over(GColor8 background_color)
PropertyAnimationAccessors::gpoint
GPointSetter gpoint
Use if the property to animate is of GPoint type.
Definition: pebble.h:6187
app_sync_get
const Tuple * app_sync_get(const struct AppSync *s, const uint32_t key)
gdraw_command_list_draw
void gdraw_command_list_draw(GContext *ctx, GDrawCommandList *command_list)
persist_delete
status_t persist_delete(const uint32_t key)
DictationSessionStatus
DictationSessionStatus
Definition: pebble.h:1977
property_animation_update_uint32
void property_animation_update_uint32(PropertyAnimation *property_animation, const uint32_t distance_normalized)
gdraw_command_get_stroke_color
GColor gdraw_command_get_stroke_color(GDrawCommand *command)
DICT_INVALID_ARGS
@ DICT_INVALID_ARGS
One or more arguments were invalid or uninitialized.
Definition: pebble.h:1633
graphics_fill_radial
void graphics_fill_radial(GContext *ctx, GRect rect, GOvalScaleMode scale_mode, uint16_t inset_thickness, int32_t angle_start, int32_t angle_end)
GColor8Setter
void(* GColor8Setter)(void *subject, GColor8 gcolor)
Definition: pebble.h:6163
scroll_layer_create
ScrollLayer * scroll_layer_create(GRect frame)
WatchInfoColor
WatchInfoColor
The different watch colors.
Definition: pebble.h:222
scroll_layer_get_paging
bool scroll_layer_get_paging(ScrollLayer *scroll_layer)
window_destroy
void window_destroy(Window *window)
Destroys a Window previously created by window_create.
S_FALSE
@ S_FALSE
Equivalent of boolean false.
Definition: pebble.h:2970
SmartstrapHandlers::availability_did_change
SmartstrapServiceAvailabilityHandler availability_did_change
The connection handler is called after the connection state changes.
Definition: pebble.h:4854
app_focus_service_unsubscribe
void app_focus_service_unsubscribe(void)
WATCH_INFO_MODEL_PEBBLE_TIME_STEEL
@ WATCH_INFO_MODEL_PEBBLE_TIME_STEEL
Pebble Time Steel.
Definition: pebble.h:211
gbitmap_sequence_get_current_frame_idx
int32_t gbitmap_sequence_get_current_frame_idx(GBitmapSequence *bitmap_sequence)
layer_get_data
void * layer_get_data(const Layer *layer)
ACCEL_AXIS_Z
@ ACCEL_AXIS_Z
Definition: pebble.h:640
GTextOverflowModeTrailingEllipsis
@ GTextOverflowModeTrailingEllipsis
Definition: pebble.h:4667
GCornerMask
GCornerMask
Definition: pebble.h:3955
MenuLayerCallbacks::select_long_click
MenuLayerSelectCallback select_long_click
Definition: pebble.h:7111
MenuLayerDrawBackgroundCallback
void(* MenuLayerDrawBackgroundCallback)(GContext *ctx, const Layer *bg_layer, bool highlight, void *callback_context)
Definition: pebble.h:7059
HealthServiceTimeScopeDailyWeekdayOrWeekend
@ HealthServiceTimeScopeDailyWeekdayOrWeekend
Definition: pebble.h:921
GBitmapDataRowInfo
Definition: pebble.h:3683
APP_MSG_CALLBACK_NOT_REGISTERED
@ APP_MSG_CALLBACK_NOT_REGISTERED
(2048) The callback could not be deregistered, because it had not been registered before.
Definition: pebble.h:2195
GTextAlignmentLeft
@ GTextAlignmentLeft
Aligns the text to the left of the drawing box.
Definition: pebble.h:4678
DictationSessionStatusFailureNoSpeechDetected
@ DictationSessionStatusFailureNoSpeechDetected
No speech was detected and UI exited.
Definition: pebble.h:1991
app_glance_reload
void app_glance_reload(AppGlanceReloadCallback callback, void *context)
APP_LAUNCH_QUICK_LAUNCH
@ APP_LAUNCH_QUICK_LAUNCH
App launched by user using quick launch.
Definition: pebble.h:3139
MONTH_UNIT
@ MONTH_UNIT
Flag to represent the "months" time unit.
Definition: pebble.h:825
SmartstrapHandlers::did_write
SmartstrapWriteHandler did_write
The did_write handler is called when a write has completed.
Definition: pebble.h:4858
status_t
int32_t status_t
Return value for system operations. See StatusCode for possible values.
Definition: pebble.h:2981
HealthEventHandler
void(* HealthEventHandler)(HealthEventType event, void *context)
Definition: pebble.h:1175
MeasurementSystemUnknown
@ MeasurementSystemUnknown
The measurement system is unknown, or does not apply to the chosen metric.
Definition: pebble.h:1301
WindowHandlers::appear
WindowHandler appear
Definition: pebble.h:5300
ActionMenuConfig
Configuration struct for the ActionMenu.
Definition: pebble.h:8041
uuid_to_string
void uuid_to_string(const Uuid *uuid, char *buffer)
app_message_register_outbox_failed
AppMessageOutboxFailed app_message_register_outbox_failed(AppMessageOutboxFailed failed_callback)
number_window_set_step_size
void number_window_set_step_size(NumberWindow *numberwindow, int32_t step)
AccelAxisType
AccelAxisType
Enumerated values defining the three accelerometer axes.
Definition: pebble.h:631
window_is_loaded
bool window_is_loaded(Window *window)
SmartstrapResultInvalidArgs
@ SmartstrapResultInvalidArgs
Invalid function arguments were supplied.
Definition: pebble.h:4802
graphics_context_set_compositing_mode
void graphics_context_set_compositing_mode(GContext *ctx, GCompOp mode)
smartstrap_set_timeout
void smartstrap_set_timeout(uint16_t timeout_ms)
window_stack_pop_all
void window_stack_pop_all(const bool animated)
Tuplet::length
const uint16_t length
Length of the data.
Definition: pebble.h:1842
VibePattern::durations
const uint32_t * durations
Definition: pebble.h:8189
layer_get_hidden
bool layer_get_hidden(const Layer *layer)
dict_serialize_tuplets
DictionaryResult dict_serialize_tuplets(DictionarySerializeCallback callback, void *context, const Tuplet *const tuplets, const uint8_t tuplets_count)
GColor8Getter
GColor8(* GColor8Getter)(void *subject)
Definition: pebble.h:6169
data_logging_finish
void data_logging_finish(DataLoggingSessionRef logging_session)
dict_write_end
uint32_t dict_write_end(DictionaryIterator *iter)
menu_layer_set_selected_index
void menu_layer_set_selected_index(MenuLayer *menu_layer, MenuIndex index, MenuRowAlign scroll_align, bool animated)
FRIDAY
@ FRIDAY
Friday.
Definition: pebble.h:342
VibePattern::num_segments
uint32_t num_segments
Definition: pebble.h:8193
WindowHandlers::unload
WindowHandler unload
Definition: pebble.h:5309
SmartstrapResultServiceUnavailable
@ SmartstrapResultServiceUnavailable
Definition: pebble.h:4809
animation_set_elapsed
bool animation_set_elapsed(Animation *animation, uint32_t elapsed_ms)
graphics_capture_frame_buffer_format
GBitmap * graphics_capture_frame_buffer_format(GContext *ctx, GBitmapFormat format)
heap_bytes_free
size_t heap_bytes_free(void)
DictationSessionStatusFailureInternalError
@ DictationSessionStatusFailureInternalError
Voice transcription failed due to internal error.
Definition: pebble.h:2000
GPoint::x
int16_t x
The x-coordinate.
Definition: pebble.h:3318
accel_service_peek
int accel_service_peek(AccelData *data)
dict_write_data
DictionaryResult dict_write_data(DictionaryIterator *iter, const uint32_t key, const uint8_t *const data, const uint16_t size)
menu_cell_basic_draw
void menu_cell_basic_draw(GContext *ctx, const Layer *cell_layer, const char *title, const char *subtitle, GBitmap *icon)
text_layer_set_text_alignment
void text_layer_set_text_alignment(TextLayer *text_layer, GTextAlignment text_alignment)
WatchInfoVersion::major
uint8_t major
Major version number.
Definition: pebble.h:271
GCornersAll
@ GCornersAll
All corners.
Definition: pebble.h:3967
health_service_aggregate_averaged
HealthValue health_service_aggregate_averaged(HealthMetric metric, time_t time_start, time_t time_end, HealthAggregation aggregation, HealthServiceTimeScope scope)
WindowHandlers::load
WindowHandler load
Definition: pebble.h:5294
BatteryChargeState::is_charging
bool is_charging
True if the battery is currently being charged. False if not.
Definition: pebble.h:566
APP_LAUNCH_SMARTSTRAP
@ APP_LAUNCH_SMARTSTRAP
App launched by a smartstrap.
Definition: pebble.h:3141
SimpleMenuItem::subtitle
const char * subtitle
The subtitle of the menu item. Optional, leave NULL if unused.
Definition: pebble.h:7363
MenuLayerDrawHeaderCallback
void(* MenuLayerDrawHeaderCallback)(GContext *ctx, const Layer *cell_layer, uint16_t section_index, void *callback_context)
Definition: pebble.h:6992
HealthServiceAccessibilityMaskNotAvailable
@ HealthServiceAccessibilityMaskNotAvailable
No samples were recorded for the given time span.
Definition: pebble.h:1090
DATA_LOGGING_UINT
@ DATA_LOGGING_UINT
Unsigned integer. This may be a 1, 2, or 4 byte integer depending on the item_length parameter.
Definition: pebble.h:1371
app_worker_launch
AppWorkerResult app_worker_launch(void)
AppMessageOutboxSent
void(* AppMessageOutboxSent)(DictionaryIterator *iterator, void *context)
Definition: pebble.h:2267
AppSyncTupleChangedCallback
void(* AppSyncTupleChangedCallback)(const uint32_t key, const Tuple *new_tuple, const Tuple *old_tuple, void *context)
Definition: pebble.h:2464
GColor8::a
uint8_t a
Alpha. 3 = 100% opaque, 2 = 66% opaque, 1 = 33% opaque, 0 = transparent.
Definition: pebble.h:3274
scroll_layer_get_content_offset
GPoint scroll_layer_get_content_offset(ScrollLayer *scroll_layer)
AnimationImplementation
Definition: pebble.h:5896
CompassHeading
int32_t CompassHeading
Definition: pebble.h:755
GAlignBottomLeft
@ GAlignBottomLeft
Align by making the bottom edges overlap and left edges overlap.
Definition: pebble.h:3731
gdraw_command_frame_get_command_list
GDrawCommandList * gdraw_command_frame_get_command_list(GDrawCommandFrame *frame)
AccelRawDataHandler
void(* AccelRawDataHandler)(AccelRawData *data, uint32_t num_samples, uint64_t timestamp)
Definition: pebble.h:652
app_message_register_inbox_dropped
AppMessageInboxDropped app_message_register_inbox_dropped(AppMessageInboxDropped dropped_callback)
clock_get_timezone
void clock_get_timezone(char *timezone, const size_t buffer_size)
AppGlanceSlice::icon
PublishedId icon
Definition: pebble.h:3204
TODAY
@ TODAY
Today.
Definition: pebble.h:336
gdraw_command_set_stroke_color
void gdraw_command_set_stroke_color(GDrawCommand *command, GColor stroke_color)
gdraw_command_list_iterate
void gdraw_command_list_iterate(GDrawCommandList *command_list, GDrawCommandListIteratorCb handle_command, void *callback_context)
gbitmap_sequence_get_bitmap_size
GSize gbitmap_sequence_get_bitmap_size(GBitmapSequence *bitmap_sequence)
property_animation_update_gcolor8
void property_animation_update_gcolor8(PropertyAnimation *property_animation, const uint32_t distance_normalized)
connection_service_peek_pebble_app_connection
bool connection_service_peek_pebble_app_connection(void)
GAlignTopLeft
@ GAlignTopLeft
Align by making the top edges overlap and left edges overlap.
Definition: pebble.h:3717
GEdgeInsets::right
int16_t right
The inset at the right of an object.
Definition: pebble.h:3808
layer_get_frame
GRect layer_get_frame(const Layer *layer)
fonts_get_system_font
GFont fonts_get_system_font(const char *font_key)
window_create
Window * window_create(void)
WATCH_INFO_COLOR_TIME_BLACK
@ WATCH_INFO_COLOR_TIME_BLACK
Time Black.
Definition: pebble.h:238
CompassStatusDataInvalid
@ CompassStatusDataInvalid
Definition: pebble.h:743
E_OUT_OF_MEMORY
@ E_OUT_OF_MEMORY
Insufficient allocatable memory available.
Definition: pebble.h:2943
HealthActivityMask
uint32_t HealthActivityMask
Expresses a set of HealthActivity values as a bitmask.
Definition: pebble.h:1015
MenuLayerSelectCallback
void(* MenuLayerSelectCallback)(struct MenuLayer *menu_layer, MenuIndex *cell_index, void *callback_context)
Definition: pebble.h:7021
AppGlanceSlice::subtitle_template_string
const char * subtitle_template_string
Definition: pebble.h:3207
AppWorkerMessage
Generic structure of a worker message that can be sent between an app and its worker.
Definition: pebble.h:2756
GPointGetter
GPointReturn(* GPointGetter)(void *subject)
Definition: pebble.h:6148
gdraw_command_sequence_set_play_count
void gdraw_command_sequence_set_play_count(GDrawCommandSequence *sequence, uint32_t play_count)
AccelTapHandler
void(* AccelTapHandler)(AccelAxisType axis, int32_t direction)
Definition: pebble.h:657
GAlignTopRight
@ GAlignTopRight
Align by making the top edges overlap and left edges overlap.
Definition: pebble.h:3719
WATCH_INFO_COLOR_PEBBLE_2_HR_WHITE
@ WATCH_INFO_COLOR_PEBBLE_2_HR_WHITE
Pebble 2 HR, White / Gray.
Definition: pebble.h:254
smartstrap_attribute_get_service_id
SmartstrapServiceId smartstrap_attribute_get_service_id(SmartstrapAttribute *attribute)
gbitmap_create_as_sub_bitmap
GBitmap * gbitmap_create_as_sub_bitmap(const GBitmap *base_bitmap, GRect sub_rect)
graphics_release_frame_buffer
bool graphics_release_frame_buffer(GContext *ctx, GBitmap *buffer)
animation_get_elapsed
bool animation_get_elapsed(Animation *animation, int32_t *elapsed_ms)
gbitmap_get_format
GBitmapFormat gbitmap_get_format(const GBitmap *bitmap)
graphics_draw_round_rect
void graphics_draw_round_rect(GContext *ctx, GRect rect, uint16_t radius)
action_menu_item_get_action_data
void * action_menu_item_get_action_data(const ActionMenuItem *item)
text_layer_destroy
void text_layer_destroy(TextLayer *text_layer)
Destroys a TextLayer previously created by text_layer_create.
WATCH_INFO_MODEL_PEBBLE_STEEL
@ WATCH_INFO_MODEL_PEBBLE_STEEL
Pebble Steel.
Definition: pebble.h:209
graphics_context_set_text_color
void graphics_context_set_text_color(GContext *ctx, GColor color)
GCornerNone
@ GCornerNone
No corners.
Definition: pebble.h:3957
WATCH_INFO_COLOR_BLACK
@ WATCH_INFO_COLOR_BLACK
Black.
Definition: pebble.h:224
GSize::w
int16_t w
The width.
Definition: pebble.h:3338
health_service_set_heart_rate_sample_period
bool health_service_set_heart_rate_sample_period(uint16_t interval_sec)
dict_write_int
DictionaryResult dict_write_int(DictionaryIterator *iter, const uint32_t key, const void *integer, const uint8_t width_bytes, const bool is_signed)
AnimationTeardownImplementation
void(* AnimationTeardownImplementation)(Animation *animation)
Definition: pebble.h:5879
wakeup_get_launch_event
bool wakeup_get_launch_event(WakeupId *wakeup_id, int32_t *cookie)
scroll_layer_set_content_offset
void scroll_layer_set_content_offset(ScrollLayer *scroll_layer, GPoint offset, bool animated)
APP_GLANCE_RESULT_INVALID_SESSION
@ APP_GLANCE_RESULT_INVALID_SESSION
The AppGlanceReloadSession provided was invalid.
Definition: pebble.h:3229
SmartstrapWriteHandler
void(* SmartstrapWriteHandler)(SmartstrapAttribute *attribute, SmartstrapResult result)
Definition: pebble.h:4845
health_service_metric_averaged_accessible
HealthServiceAccessibilityMask health_service_metric_averaged_accessible(HealthMetric metric, time_t time_start, time_t time_end, HealthServiceTimeScope scope)
grect_center_point
GPoint grect_center_point(const GRect *rect)
app_message_register_outbox_sent
AppMessageOutboxSent app_message_register_outbox_sent(AppMessageOutboxSent sent_callback)
ActionMenuDidCloseCb
void(* ActionMenuDidCloseCb)(ActionMenu *menu, const ActionMenuItem *performed_action, void *context)
Definition: pebble.h:8014
gpath_draw_outline
void gpath_draw_outline(GContext *ctx, GPath *path)
APP_MSG_BUSY
@ APP_MSG_BUSY
Definition: pebble.h:2183
simple_menu_layer_set_selected_index
void simple_menu_layer_set_selected_index(SimpleMenuLayer *simple_menu, int32_t index, bool animated)
HealthServiceTimeScope
HealthServiceTimeScope
Used by health_service_sum_averaged() to specify how the average is computed.
Definition: pebble.h:913
TUPLE_UINT
@ TUPLE_UINT
Definition: pebble.h:1649
scroll_layer_set_context
void scroll_layer_set_context(ScrollLayer *scroll_layer, void *context)
MenuLayerCallbacks::draw_row
MenuLayerDrawRowCallback draw_row
Definition: pebble.h:7094
DATA_LOGGING_BUSY
@ DATA_LOGGING_BUSY
Someone else is writing to this logging session.
Definition: pebble.h:1379
tm::tm_gmtoff
int tm_gmtoff
Definition: pebble.h:8322
SimpleMenuItem
Data structure containing the information of a menu item.
Definition: pebble.h:7359
property_animation_get_animation
Animation * property_animation_get_animation(PropertyAnimation *property_animation)
MenuLayerCallbacks::draw_header
MenuLayerDrawHeaderCallback draw_header
Definition: pebble.h:7101
text_layer_set_text_color
void text_layer_set_text_color(TextLayer *text_layer, GColor color)
text_layer_set_size
void text_layer_set_size(TextLayer *text_layer, const GSize max_size)
gpath_create
GPath * gpath_create(const GPathInfo *init)
APP_GLANCE_RESULT_EXPIRES_IN_THE_PAST
@ APP_GLANCE_RESULT_EXPIRES_IN_THE_PAST
The expiration_time provided in the slice expires in the past.
Definition: pebble.h:3227
PropertyAnimationAccessors::grect
GRectGetter grect
Use if the property to animate is of GRect type.
Definition: pebble.h:6205
E_INTERNAL
@ E_INTERNAL
There was a generic internal logic error.
Definition: pebble.h:2937
WATCH_INFO_COLOR_PEBBLE_TIME_2_SILVER
@ WATCH_INFO_COLOR_PEBBLE_TIME_2_SILVER
Pebble Time 2, Silver.
Definition: pebble.h:261
health_service_metric_aggregate_averaged_accessible
HealthServiceAccessibilityMask health_service_metric_aggregate_averaged_accessible(HealthMetric metric, time_t time_start, time_t time_end, HealthAggregation aggregation, HealthServiceTimeScope scope)
S_TRUE
@ S_TRUE
Equivalent of boolean true.
Definition: pebble.h:2967
vibes_short_pulse
void vibes_short_pulse(void)
Makes the watch emit one short vibration.
GDrawCommandTypeInvalid
@ GDrawCommandTypeInvalid
Invalid draw command type.
Definition: pebble.h:4233
HealthMinuteData::is_invalid
bool is_invalid
Definition: pebble.h:1264
layer_get_clips
bool layer_get_clips(const Layer *layer)
AnimationCurveEaseInOut
@ AnimationCurveEaseInOut
Bicubic ease-in-out: accelerate from zero velocity, decelerate to zero velocity.
Definition: pebble.h:5549
DictationSessionStatusFailureTranscriptionRejectedWithError
@ DictationSessionStatusFailureTranscriptionRejectedWithError
User exited UI after transcription error.
Definition: pebble.h:1985
Tuplet::data
const char * data
Pointer to the c-string data.
Definition: pebble.h:1847
APP_LAUNCH_WORKER
@ APP_LAUNCH_WORKER
App launched by worker calling worker_launch_app()
Definition: pebble.h:3138
menu_layer_get_selected_index
MenuIndex menu_layer_get_selected_index(const MenuLayer *menu_layer)
NumberWindowCallbacks::decremented
NumberWindowCallback decremented
Definition: pebble.h:7929
content_indicator_get_content_available
bool content_indicator_get_content_available(ContentIndicator *content_indicator, ContentIndicatorDirection direction)
GCompOp
GCompOp
Definition: pebble.h:3761
window_get_click_config_provider
ClickConfigProvider window_get_click_config_provider(const Window *window)
GAlignRight
@ GAlignRight
Align by making the right edges overlap and centered vertically.
Definition: pebble.h:3727
MenuLayerDrawRowCallback
void(* MenuLayerDrawRowCallback)(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, void *callback_context)
Definition: pebble.h:6973
scroll_layer_set_content_size
void scroll_layer_set_content_size(ScrollLayer *scroll_layer, GSize size)
TUPLE_CSTRING
@ TUPLE_CSTRING
The value is a zero-terminated, UTF-8 C-string.
Definition: pebble.h:1646
app_sync_deinit
void app_sync_deinit(struct AppSync *s)
GPath::points
GPoint * points
Pointer to an array of points.
Definition: pebble.h:4533
BUTTON_ID_UP
@ BUTTON_ID_UP
Up button.
Definition: pebble.h:164
GPath::num_points
uint32_t num_points
The number of points in the points array.
Definition: pebble.h:4531
APP_MSG_INVALID_ARGS
@ APP_MSG_INVALID_ARGS
(32) The function was called with invalid arguments.
Definition: pebble.h:2179
GTextAlignmentRight
@ GTextAlignmentRight
Aligns the text to the right of the drawing box.
Definition: pebble.h:4682
health_service_events_unsubscribe
bool health_service_events_unsubscribe(void)
WATCH_INFO_MODEL_PEBBLE_TIME_2
@ WATCH_INFO_MODEL_PEBBLE_TIME_2
Pebble Time 2.
Definition: pebble.h:216
DictationSessionStatusFailureTranscriptionRejected
@ DictationSessionStatusFailureTranscriptionRejected
User rejected transcription and exited UI.
Definition: pebble.h:1982
AppGlanceSlice::expiration_time
time_t expiration_time
Definition: pebble.h:3211
dictation_session_enable_error_dialogs
void dictation_session_enable_error_dialogs(DictationSession *session, bool is_enabled)
menu_layer_set_center_focused
void menu_layer_set_center_focused(MenuLayer *menu_layer, bool center_focused)
S_NO_MORE_ITEMS
@ S_NO_MORE_ITEMS
For list-style requests. At end of list.
Definition: pebble.h:2973
status_bar_layer_get_layer
Layer * status_bar_layer_get_layer(StatusBarLayer *status_bar_layer)
E_ERROR
@ E_ERROR
An error occurred (no description).
Definition: pebble.h:2931
MeasurementSystem
MeasurementSystem
Types of measurement system a HealthMetric may be measured in.
Definition: pebble.h:1299
GEdgeInsets
#define GEdgeInsets(...)
Definition: pebble.h:3845
gbitmap_set_palette
void gbitmap_set_palette(GBitmap *bitmap, GColor *palette, bool free_on_destroy)
dict_read_begin_from_buffer
Tuple * dict_read_begin_from_buffer(DictionaryIterator *iter, const uint8_t *const buffer, const uint16_t size)
WATCH_INFO_COLOR_GREEN
@ WATCH_INFO_COLOR_GREEN
Green.
Definition: pebble.h:234
PropertyAnimationAccessors::uint32
UInt32Getter uint32
Use if the property to animate is of uint32_t type.
Definition: pebble.h:6209
SmartstrapHandlers::notified
SmartstrapNotifyHandler notified
The notified handler is called whenever a notification is received for an attribute.
Definition: pebble.h:4860
window_set_click_config_provider_with_context
void window_set_click_config_provider_with_context(Window *window, ClickConfigProvider click_config_provider, void *context)
animation_set_curve
bool animation_set_curve(Animation *animation, AnimationCurve curve)
APP_MSG_CALLBACK_ALREADY_REGISTERED
@ APP_MSG_CALLBACK_ALREADY_REGISTERED
(1024) The callback was already registered.
Definition: pebble.h:2192
Tuplet::storage
uint32_t storage
Definition: pebble.h:1855
window_long_click_subscribe
void window_long_click_subscribe(ButtonId button_id, uint16_t delay_ms, ClickHandler down_handler, ClickHandler up_handler)
AnimationCurveLinear
@ AnimationCurveLinear
Linear curve: the velocity is constant.
Definition: pebble.h:5543
PropertyAnimationAccessors
struct PropertyAnimationAccessors PropertyAnimationAccessors
Definition: pebble.h:5982
persist_read_bool
bool persist_read_bool(const uint32_t key)
GAlignBottom
@ GAlignBottom
Align by making the bottom edges overlap and centered horizontally.
Definition: pebble.h:3725
ContentIndicatorDirectionDown
@ ContentIndicatorDirectionDown
The down direction.
Definition: pebble.h:6746
gbitmap_sequence_get_play_count
uint32_t gbitmap_sequence_get_play_count(GBitmapSequence *bitmap_sequence)
APP_MSG_APP_NOT_RUNNING
@ APP_MSG_APP_NOT_RUNNING
(16) The local application was not running.
Definition: pebble.h:2176
GCornersTop
@ GCornersTop
Top corners.
Definition: pebble.h:3969
gbitmap_set_data
void gbitmap_set_data(GBitmap *bitmap, uint8_t *data, GBitmapFormat format, uint16_t row_size_bytes, bool free_on_destroy)
BatteryStateHandler
void(* BatteryStateHandler)(BatteryChargeState charge)
Definition: pebble.h:573
GTextOverflowModeFill
@ GTextOverflowModeFill
Definition: pebble.h:4670
health_service_events_subscribe
bool health_service_events_subscribe(HealthEventHandler handler, void *context)
dict_serialize_tuplets_to_buffer_with_iter
DictionaryResult dict_serialize_tuplets_to_buffer_with_iter(DictionaryIterator *iter, const Tuplet *const tuplets, const uint8_t tuplets_count, uint8_t *buffer, uint32_t *size_in_out)
DictionaryKeyUpdatedCallback
void(* DictionaryKeyUpdatedCallback)(const uint32_t key, const Tuple *new_tuple, const Tuple *old_tuple, void *context)
Definition: pebble.h:1947
graphics_context_set_fill_color
void graphics_context_set_fill_color(GContext *ctx, GColor color)
graphics_text_layout_get_content_size
GSize graphics_text_layout_get_content_size(const char *text, GFont const font, const GRect box, const GTextOverflowMode overflow_mode, const GTextAlignment alignment)
SmartstrapHandlers::did_read
SmartstrapReadHandler did_read
The read handler is called whenever a read is complete or the read times-out.
Definition: pebble.h:4856
rot_bitmap_layer_create
RotBitmapLayer * rot_bitmap_layer_create(GBitmap *bitmap)
GPath
Definition: pebble.h:4529
StatusCode
StatusCode
Status codes. See status_t.
Definition: pebble.h:2926
AnimationCurveEaseOut
@ AnimationCurveEaseOut
Bicubic ease-in: decelerate to zero velocity.
Definition: pebble.h:5547
GDrawCommandList
struct GDrawCommandList GDrawCommandList
Draw command lists contain a list of commands that can be iterated over and drawn all at once.
Definition: pebble.h:4218
wakeup_service_subscribe
void wakeup_service_subscribe(WakeupHandler handler)
GPathInfo
struct GPathInfo GPathInfo
GPath::rotation
int32_t rotation
Definition: pebble.h:4536
gbitmap_set_bounds
void gbitmap_set_bounds(GBitmap *bitmap, GRect bounds)
layer_set_clips
void layer_set_clips(Layer *layer, bool clips)
gbitmap_create_with_resource
GBitmap * gbitmap_create_with_resource(uint32_t resource_id)
unobstructed_area_service_unsubscribe
void unobstructed_area_service_unsubscribe(void)
Unsubscribe from notifications about changes to the app's unobstructed area.
action_bar_layer_destroy
void action_bar_layer_destroy(ActionBarLayer *action_bar_layer)
Destroys a ActionBarLayer previously created by action_bar_layer_create.
gdraw_command_set_fill_color
void gdraw_command_set_fill_color(GDrawCommand *command, GColor fill_color)
animation_get_play_count
uint32_t animation_get_play_count(Animation *animation)
WindowHandlers
struct WindowHandlers WindowHandlers
number_window_set_label
void number_window_set_label(NumberWindow *numberwindow, const char *label)
DictionaryIterator::end
const void * end
Definition: pebble.h:1707
gdraw_command_sequence_get_bounds_size
GSize gdraw_command_sequence_get_bounds_size(GDrawCommandSequence *sequence)
DICT_INTERNAL_INCONSISTENCY
@ DICT_INTERNAL_INCONSISTENCY
The lengths and/or count of the dictionary its tuples are inconsistent.
Definition: pebble.h:1635
GCornerBottomRight
@ GCornerBottomRight
Bottom-Right corner.
Definition: pebble.h:3965
property_animation_from
bool property_animation_from(PropertyAnimation *property_animation, void *from, size_t size, bool set)
scroll_layer_get_layer
Layer * scroll_layer_get_layer(const ScrollLayer *scroll_layer)
StatusBarLayerSeparatorModeDotted
@ StatusBarLayerSeparatorModeDotted
A dotted separator at the bottom of the status bar.
Definition: pebble.h:7662
gbitmap_get_bounds
GRect gbitmap_get_bounds(const GBitmap *bitmap)
action_menu_level_add_action
ActionMenuItem * action_menu_level_add_action(ActionMenuLevel *level, const char *label, ActionMenuPerformActionCb cb, void *action_data)
gdraw_command_sequence_destroy
void gdraw_command_sequence_destroy(GDrawCommandSequence *sequence)
AnimationImplementation::teardown
AnimationTeardownImplementation teardown
Definition: pebble.h:5905
HealthServiceTimeScopeOnce
@ HealthServiceTimeScopeOnce
No average computed. The result is the same as calling health_service_sum().
Definition: pebble.h:915
WATCH_INFO_COLOR_RED
@ WATCH_INFO_COLOR_RED
Red.
Definition: pebble.h:226
wakeup_cancel_all
void wakeup_cancel_all(void)
Cancels all wakeup event for the app.
SNIFF_INTERVAL_REDUCED
@ SNIFF_INTERVAL_REDUCED
Definition: pebble.h:2823
layer_add_child
void layer_add_child(Layer *parent, Layer *child)
DictationSessionStatusSuccess
@ DictationSessionStatusSuccess
Transcription successful, with a valid result.
Definition: pebble.h:1979
status_bar_layer_create
StatusBarLayer * status_bar_layer_create(void)
GSize::h
int16_t h
The height.
Definition: pebble.h:3340
time_start_of_today
time_t time_start_of_today(void)
accel_tap_service_subscribe
void accel_tap_service_subscribe(AccelTapHandler handler)
persist_read_int
int32_t persist_read_int(const uint32_t key)
GCornerBottomLeft
@ GCornerBottomLeft
Bottom-Left corner.
Definition: pebble.h:3963
layer_destroy
void layer_destroy(Layer *layer)
Destroys a layer previously created by layer_create.
rot_bitmap_layer_set_angle
void rot_bitmap_layer_set_angle(RotBitmapLayer *bitmap, int32_t angle)
Tuplet::width
const uint16_t width
Width of the integer.
Definition: pebble.h:1857
GCornerTopRight
@ GCornerTopRight
Top-Right corner.
Definition: pebble.h:3961
menu_layer_destroy
void menu_layer_destroy(MenuLayer *menu_layer)
Destroys a MenuLayer previously created by menu_layer_create.
ContentIndicatorConfig::times_out
bool times_out
Whether the display of the arrow indicator should timeout.
Definition: pebble.h:6754
layer_remove_child_layers
void layer_remove_child_layers(Layer *parent)
DATA_LOGGING_CLOSED
@ DATA_LOGGING_CLOSED
The logging session was made inactive.
Definition: pebble.h:1382
ACCEL_SAMPLING_100HZ
@ ACCEL_SAMPLING_100HZ
100 HZ sampling rate
Definition: pebble.h:668
smartstrap_subscribe
SmartstrapResult smartstrap_subscribe(SmartstrapHandlers handlers)
grect_equal
bool grect_equal(const GRect *const rect_a, const GRect *const rect_b)
tm
Definition: pebble.h:8311
gdraw_command_list_get_command
GDrawCommand * gdraw_command_list_get_command(GDrawCommandList *command_list, uint16_t command_idx)
ACCEL_SAMPLING_50HZ
@ ACCEL_SAMPLING_50HZ
50 HZ sampling rate
Definition: pebble.h:666
GBitmapDataRowInfo::data
uint8_t * data
Definition: pebble.h:3691
animation_unschedule_all
void animation_unschedule_all(void)
DICT_OK
@ DICT_OK
The operation returned successfully.
Definition: pebble.h:1629
AnimationHandlers
struct AnimationHandlers AnimationHandlers
E_RANGE
@ E_RANGE
Argument out of range (may be dynamic).
Definition: pebble.h:2952
ActionMenuConfig::will_close
ActionMenuDidCloseCb will_close
Called immediately before the ActionMenu closes.
Definition: pebble.h:8048
number_window_set_value
void number_window_set_value(NumberWindow *numberwindow, int32_t value)
click_number_of_clicks_counted
uint8_t click_number_of_clicks_counted(ClickRecognizerRef recognizer)
ACCEL_AXIS_Y
@ ACCEL_AXIS_Y
Definition: pebble.h:637
health_service_cancel_metric_alert
bool health_service_cancel_metric_alert(HealthMetricAlert *alert)
SECOND_UNIT
@ SECOND_UNIT
Flag to represent the "seconds" time unit.
Definition: pebble.h:817
tm::tm_year
int tm_year
Definition: pebble.h:8317
gdraw_command_image_set_bounds_size
void gdraw_command_image_set_bounds_size(GDrawCommandImage *image, GSize size)
window_get_root_layer
struct Layer * window_get_root_layer(const Window *window)
HealthMetricHeartRateBPM
@ HealthMetricHeartRateBPM
The heart rate, in beats per minute. This is a filtered value that is at most 15 minutes old.
Definition: pebble.h:875
E_BUSY
@ E_BUSY
Another operation prevented this one.
Definition: pebble.h:2961
action_menu_get_context
void * action_menu_get_context(ActionMenu *action_menu)
E_INVALID_OPERATION
@ E_INVALID_OPERATION
Operation not allowed (may depend on state).
Definition: pebble.h:2958
SimpleMenuSection::num_items
uint32_t num_items
Number of items in the .items array.
Definition: pebble.h:7378
ClickRecognizerRef
void * ClickRecognizerRef
Definition: pebble.h:4970
AppWorkerResult
AppWorkerResult
Possible error codes from app_worker_launch, app_worker_kill.
Definition: pebble.h:2740
GRectGetter
GRectReturn(* GRectGetter)(void *subject)
Definition: pebble.h:6158
HealthMetricHeartRateRawBPM
@ HealthMetricHeartRateRawBPM
The raw heart rate value of the most recent sample, in beats per minute.
Definition: pebble.h:877
menu_layer_set_callbacks
void menu_layer_set_callbacks(MenuLayer *menu_layer, void *callback_context, MenuLayerCallbacks callbacks)
MenuLayerCallbacks::get_num_rows
MenuLayerGetNumberOfRowsInSectionsCallback get_num_rows
Definition: pebble.h:7074
BUTTON_ID_BACK
@ BUTTON_ID_BACK
Back button.
Definition: pebble.h:162
clock_is_24h_style
bool clock_is_24h_style(void)
MenuLayerCallbacks::draw_separator
MenuLayerDrawSeparatorCallback draw_separator
Definition: pebble.h:7127
PropertyAnimationAccessors
Definition: pebble.h:6179
MenuLayerCallbacks::selection_will_change
MenuLayerSelectionWillChangeCallback selection_will_change
Definition: pebble.h:7133
HealthIterationDirection
HealthIterationDirection
Definition: pebble.h:1056
exit_reason_set
void exit_reason_set(AppExitReason exit_reason)
StatusBarLayerSeparatorMode
StatusBarLayerSeparatorMode
Values that are used to indicate the different status bar separator modes.
Definition: pebble.h:7658
graphics_text_attributes_enable_screen_text_flow
void graphics_text_attributes_enable_screen_text_flow(GTextAttributes *text_attributes, uint8_t inset)
UnobstructedAreaHandlers::will_change
UnobstructedAreaWillChangeHandler will_change
Handler that will be called just before the unobstructed area will begin changing.
Definition: pebble.h:6381
ActionMenuLevelDisplayModeWide
@ ActionMenuLevelDisplayModeWide
Each item gets its own row.
Definition: pebble.h:8021
smartstrap_attribute_destroy
void smartstrap_attribute_destroy(SmartstrapAttribute *attribute)
gdraw_command_sequence_get_play_count
uint32_t gdraw_command_sequence_get_play_count(GDrawCommandSequence *sequence)
gdraw_command_set_hidden
void gdraw_command_set_hidden(GDrawCommand *command, bool hidden)
accel_raw_data_service_subscribe
void accel_raw_data_service_subscribe(uint32_t samples_per_update, AccelRawDataHandler handler)
connection_service_peek_pebblekit_connection
bool connection_service_peek_pebblekit_connection(void)
animation_get_curve
AnimationCurve animation_get_curve(Animation *animation)
animation_create
Animation * animation_create(void)
uuid_equal
bool uuid_equal(const Uuid *uu1, const Uuid *uu2)
WATCH_INFO_COLOR_TIME_STEEL_SILVER
@ WATCH_INFO_COLOR_TIME_STEEL_SILVER
Time Steel Silver.
Definition: pebble.h:241
action_bar_layer_set_icon_animated
void action_bar_layer_set_icon_animated(ActionBarLayer *action_bar, ButtonId button_id, const GBitmap *icon, bool animated)
action_bar_layer_set_context
void action_bar_layer_set_context(ActionBarLayer *action_bar, void *context)
layer_set_frame
void layer_set_frame(Layer *layer, GRect frame)
menu_cell_title_draw
void menu_cell_title_draw(GContext *ctx, const Layer *cell_layer, const char *title)
UInt32Getter
uint32_t(* UInt32Getter)(void *subject)
Definition: pebble.h:6138
gmtime
struct tm * gmtime(const time_t *timep)
WATCH_INFO_COLOR_BLUE
@ WATCH_INFO_COLOR_BLUE
Blue.
Definition: pebble.h:233
AnimationImplementation
struct AnimationImplementation AnimationImplementation
PropertyAnimationImplementation
Definition: pebble.h:6216
MenuLayerCallbacks::draw_background
MenuLayerDrawBackgroundCallback draw_background
Definition: pebble.h:7141
WakeupId
int32_t WakeupId
WakeupId is an identifier for a wakeup event.
Definition: pebble.h:3065
MenuLayerCallbacks::get_separator_height
MenuLayerGetSeparatorHeightCallback get_separator_height
Definition: pebble.h:7120
fonts_unload_custom_font
void fonts_unload_custom_font(GFont font)
compass_service_set_heading_filter
int compass_service_set_heading_filter(CompassHeading filter)
APP_WORKER_RESULT_NOT_RUNNING
@ APP_WORKER_RESULT_NOT_RUNNING
The worker is not running.
Definition: pebble.h:2748
status_bar_layer_get_foreground_color
GColor status_bar_layer_get_foreground_color(const StatusBarLayer *status_bar_layer)
Tuplet::bytes
struct Tuplet::@0::@2 bytes
Valid when .type. is TUPLE_BYTE_ARRAY.
APP_MSG_OK
@ APP_MSG_OK
(0) All good, operation was successful.
Definition: pebble.h:2164
gpoint_from_polar
GPoint gpoint_from_polar(GRect rect, GOvalScaleMode scale_mode, int32_t angle)
tm::tm_yday
int tm_yday
Definition: pebble.h:8319
gdraw_command_set_radius
void gdraw_command_set_radius(GDrawCommand *command, uint16_t radius)
WATCH_INFO_COLOR_PEBBLE_2_HR_LIME
@ WATCH_INFO_COLOR_PEBBLE_2_HR_LIME
Pebble 2 HR, Charcoal / Sorbet Green.
Definition: pebble.h:252
gdraw_command_sequence_get_frame_by_elapsed
GDrawCommandFrame * gdraw_command_sequence_get_frame_by_elapsed(GDrawCommandSequence *sequence, uint32_t elapsed_ms)
NUM_EXIT_REASONS
@ NUM_EXIT_REASONS
Number of AppExitReason options.
Definition: pebble.h:3172
DictionaryResult
DictionaryResult
Return values for dictionary write/conversion functions.
Definition: pebble.h:1627
strftime
int strftime(char *s, size_t maxsize, const char *format, const struct tm *tm_p)
grect_is_empty
bool grect_is_empty(const GRect *const rect)
AppMessageOutboxFailed
void(* AppMessageOutboxFailed)(DictionaryIterator *iterator, AppMessageResult reason, void *context)
Definition: pebble.h:2287
grect_align
void grect_align(GRect *rect, const GRect *inside_rect, const GAlign alignment, const bool clip)
action_bar_layer_clear_icon
void action_bar_layer_clear_icon(ActionBarLayer *action_bar, ButtonId button_id)
layer_get_bounds
GRect layer_get_bounds(const Layer *layer)
AnimationCurveFunction
AnimationProgress(* AnimationCurveFunction)(AnimationProgress linear_distance)
Definition: pebble.h:5733
APP_GLANCE_RESULT_SUCCESS
@ APP_GLANCE_RESULT_SUCCESS
The slice was successfully added to the app's glance.
Definition: pebble.h:3217
WeekDay
WeekDay
Weekday values.
Definition: pebble.h:335
action_menu_level_create
ActionMenuLevel * action_menu_level_create(uint16_t max_items)
memory_cache_flush
void memory_cache_flush(void *start, size_t size)
app_worker_kill
AppWorkerResult app_worker_kill(void)
ContentIndicatorDirectionUp
@ ContentIndicatorDirectionUp
The up direction.
Definition: pebble.h:6745
AppTimerCallback
void(* AppTimerCallback)(void *data)
Definition: pebble.h:2851
AppGlanceSlice::layout
struct AppGlanceSlice::@8 layout
Describes how the slice should be visualized in the app's glance in the launcher.
AppFocusHandler
void(* AppFocusHandler)(bool in_focus)
Definition: pebble.h:492
text_layer_set_overflow_mode
void text_layer_set_overflow_mode(TextLayer *text_layer, GTextOverflowMode line_mode)
animation_schedule
bool animation_schedule(Animation *animation)
animation_get_custom_curve
AnimationCurveFunction animation_get_custom_curve(Animation *animation)
GDrawCommandTypePrecisePath
@ GDrawCommandTypePrecisePath
Arbitrary path drawn with sub-pixel precision (1/8th precision)
Definition: pebble.h:4236
MenuLayerSelectionWillChangeCallback
void(* MenuLayerSelectionWillChangeCallback)(struct MenuLayer *menu_layer, MenuIndex *new_index, MenuIndex old_index, void *callback_context)
Definition: pebble.h:7047
GDrawCommand
struct GDrawCommand GDrawCommand
Definition: pebble.h:4205
action_menu_level_set_display_mode
void action_menu_level_set_display_mode(ActionMenuLevel *level, ActionMenuLevelDisplayMode display_mode)
MenuLayerGetSeparatorHeightCallback
int16_t(* MenuLayerGetSeparatorHeightCallback)(struct MenuLayer *menu_layer, MenuIndex *cell_index, void *callback_context)
Definition: pebble.h:6957
gpoint_equal
bool gpoint_equal(const GPoint *const point_a, const GPoint *const point_b)
HealthAggregationAvg
@ HealthAggregationAvg
Definition: pebble.h:963
WATCH_INFO_COLOR_PEBBLE_TIME_2_GOLD
@ WATCH_INFO_COLOR_PEBBLE_TIME_2_GOLD
Pebble Time 2, Gold.
Definition: pebble.h:262
dict_write_begin
DictionaryResult dict_write_begin(DictionaryIterator *iter, uint8_t *const buffer, const uint16_t size)
DictationSessionStatusFailureSystemAborted
@ DictationSessionStatusFailureSystemAborted
Too many errors occurred during transcription and the UI exited.
Definition: pebble.h:1988
DATA_LOGGING_NOT_FOUND
@ DATA_LOGGING_NOT_FOUND
The logging session does not exist.
Definition: pebble.h:1381
VibePattern
Definition: pebble.h:8184
gdraw_command_get_path_open
bool gdraw_command_get_path_open(GDrawCommand *command)
GRect
#define GRect(x, y, w, h)
Convenience macro to make a GRect.
Definition: pebble.h:3365
dict_merge
DictionaryResult dict_merge(DictionaryIterator *dest, uint32_t *dest_max_size_in_out, DictionaryIterator *source, const bool update_existing_keys_only, const DictionaryKeyUpdatedCallback key_callback, void *context)
window_get_click_config_context
void * window_get_click_config_context(Window *window)
APP_GLANCE_RESULT_SLICE_CAPACITY_EXCEEDED
@ APP_GLANCE_RESULT_SLICE_CAPACITY_EXCEEDED
The provided slice would exceed the app glance's slice capacity.
Definition: pebble.h:3225
light_enable_interaction
void light_enable_interaction(void)
wakeup_cancel
void wakeup_cancel(WakeupId wakeup_id)
MenuLayerSelectionChangedCallback
void(* MenuLayerSelectionChangedCallback)(struct MenuLayer *menu_layer, MenuIndex new_index, MenuIndex old_index, void *callback_context)
Definition: pebble.h:7033
animation_set_delay
bool animation_set_delay(Animation *animation, uint32_t delay_ms)
E_OUT_OF_STORAGE
@ E_OUT_OF_STORAGE
Insufficient long-term storage available.
Definition: pebble.h:2946
layer_get_window
struct Window * layer_get_window(const Layer *layer)
APP_GLANCE_RESULT_INVALID_ICON
@ APP_GLANCE_RESULT_INVALID_ICON
The icon provided in the slice was invalid.
Definition: pebble.h:3223
THURSDAY
@ THURSDAY
Thursday.
Definition: pebble.h:341
gdraw_command_image_get_command_list
GDrawCommandList * gdraw_command_image_get_command_list(GDrawCommandImage *image)
action_bar_layer_set_click_config_provider
void action_bar_layer_set_click_config_provider(ActionBarLayer *action_bar, ClickConfigProvider click_config_provider)
NumberWindowCallback
void(* NumberWindowCallback)(struct NumberWindow *number_window, void *context)
Function signature for NumberWindow callbacks.
Definition: pebble.h:7920
PublishedId
uint32_t PublishedId
The ID of a published app resource defined within the publishedMedia section of package....
Definition: pebble.h:3187
HOUR_UNIT
@ HOUR_UNIT
Flag to represent the "hours" time unit.
Definition: pebble.h:821
NumContentIndicatorDirections
@ NumContentIndicatorDirections
The number of supported directions.
Definition: pebble.h:6747
APP_MSG_ALREADY_RELEASED
@ APP_MSG_ALREADY_RELEASED
(512) The resource had already been released.
Definition: pebble.h:2189
menu_cell_layer_is_highlighted
bool menu_cell_layer_is_highlighted(const Layer *cell_layer)
GTextOverflowModeWordWrap
@ GTextOverflowModeWordWrap
Definition: pebble.h:4663
action_bar_layer_remove_from_window
void action_bar_layer_remove_from_window(ActionBarLayer *action_bar)
fonts_load_custom_font
GFont fonts_load_custom_font(ResHandle handle)
Tuplet::key
uint32_t key
The key.
Definition: pebble.h:1832
animation_get_context
void * animation_get_context(Animation *animation)
bitmap_layer_set_alignment
void bitmap_layer_set_alignment(BitmapLayer *bitmap_layer, GAlign alignment)
gbitmap_get_data_row_info
GBitmapDataRowInfo gbitmap_get_data_row_info(const GBitmap *bitmap, uint16_t y)
vibes_double_pulse
void vibes_double_pulse(void)
text_layer_get_text
const char * text_layer_get_text(TextLayer *text_layer)
CompassHeadingData::magnetic_heading
CompassHeading magnetic_heading
Definition: pebble.h:762
resource_load
size_t resource_load(ResHandle h, uint8_t *buffer, size_t max_length)
HealthAggregation
HealthAggregation
Definition: pebble.h:956
app_worker_send_message
void app_worker_send_message(uint8_t type, AppWorkerMessage *data)
HealthValue
int32_t HealthValue
Type used to represent HealthMetric values.
Definition: pebble.h:881
SimpleMenuItem::icon
GBitmap * icon
The icon of the menu item. Optional, leave NULL if unused.
Definition: pebble.h:7365
gpath_move_to
void gpath_move_to(GPath *path, GPoint point)
HealthMinuteData::steps
uint8_t steps
Number of steps taken in this minute.
Definition: pebble.h:1261
WATCH_INFO_COLOR_TIME_ROUND_BLACK_20
@ WATCH_INFO_COLOR_TIME_ROUND_BLACK_20
Time Round 20mm lug size, Black.
Definition: pebble.h:248
menu_layer_get_layer
Layer * menu_layer_get_layer(const MenuLayer *menu_layer)
gdraw_command_image_draw
void gdraw_command_image_draw(GContext *ctx, GDrawCommandImage *image, GPoint offset)
grect_contains_point
bool grect_contains_point(const GRect *rect, const GPoint *point)
DictationSessionStatusFailureDisabled
@ DictationSessionStatusFailureDisabled
Voice transcription disabled for this user.
Definition: pebble.h:1997
ScrollLayerCallbacks
Definition: pebble.h:6569
smartstrap_unsubscribe
void smartstrap_unsubscribe(void)
AnimationSetupImplementation
void(* AnimationSetupImplementation)(Animation *animation)
Definition: pebble.h:5847
ContentIndicatorConfig::background
GColor background
The color of the layer behind the arrow.
Definition: pebble.h:6758
WATCH_INFO_COLOR_TIME_STEEL_BLACK
@ WATCH_INFO_COLOR_TIME_STEEL_BLACK
Time Steel Black.
Definition: pebble.h:242
AnimationCurveCustomInterpolationFunction
@ AnimationCurveCustomInterpolationFunction
User-provided interpolation function.
Definition: pebble.h:5554
SmartstrapResultOk
@ SmartstrapResultOk
No error occured.
Definition: pebble.h:4800
animation_is_scheduled
bool animation_is_scheduled(Animation *animation)
simple_menu_layer_create
SimpleMenuLayer * simple_menu_layer_create(GRect frame, Window *window, const SimpleMenuSection *sections, int32_t num_sections, void *callback_context)
CompassStatus
CompassStatus
Enum describing the current state of the Compass Service.
Definition: pebble.h:738
gdraw_command_sequence_set_bounds_size
void gdraw_command_sequence_set_bounds_size(GDrawCommandSequence *sequence, GSize size)
DictationSessionStatusFailureRecognizerError
@ DictationSessionStatusFailureRecognizerError
Cloud recognizer failed to transcribe speech (only possible if error dialogs disabled)
Definition: pebble.h:2003
gdraw_command_get_hidden
bool gdraw_command_get_hidden(GDrawCommand *command)
BUTTON_ID_SELECT
@ BUTTON_ID_SELECT
Select (middle) button.
Definition: pebble.h:166
MINUTE_UNIT
@ MINUTE_UNIT
Flag to represent the "minutes" time unit.
Definition: pebble.h:819
content_indicator_destroy
void content_indicator_destroy(ContentIndicator *content_indicator)
CompassHeadingData::compass_status
CompassStatus compass_status
Indicates the current state of the Compass Service calibration.
Definition: pebble.h:766
content_indicator_set_content_available
void content_indicator_set_content_available(ContentIndicator *content_indicator, ContentIndicatorDirection direction, bool available)
PropertyAnimationAccessors::gpoint
GPointGetter gpoint
Use if the property to animate is of GPoint type.
Definition: pebble.h:6203
resource_load_byte_range
size_t resource_load_byte_range(ResHandle h, uint32_t start_offset, uint8_t *buffer, size_t num_bytes)
GRectSetter
void(* GRectSetter)(void *subject, GRect grect)
Definition: pebble.h:6153
gdraw_command_sequence_get_total_duration
uint32_t gdraw_command_sequence_get_total_duration(GDrawCommandSequence *sequence)
ContentIndicatorConfig
Definition: pebble.h:6752
GRect
Definition: pebble.h:3357
HealthMinuteData::orientation
uint8_t orientation
Quantized average orientation.
Definition: pebble.h:1262
gbitmap_sequence_set_play_count
void gbitmap_sequence_set_play_count(GBitmapSequence *bitmap_sequence, uint32_t play_count)
DATA_LOGGING_BYTE_ARRAY
@ DATA_LOGGING_BYTE_ARRAY
Definition: pebble.h:1369
gbitmap_sequence_restart
bool gbitmap_sequence_restart(GBitmapSequence *bitmap_sequence)
HealthMinuteData::heart_rate_bpm
uint8_t heart_rate_bpm
heart rate in beats per minute
Definition: pebble.h:1268
menu_layer_reload_data
void menu_layer_reload_data(MenuLayer *menu_layer)
Tuplet::type
TupleType type
Definition: pebble.h:1830
window_multi_click_subscribe
void window_multi_click_subscribe(ButtonId button_id, uint8_t min_clicks, uint8_t max_clicks, uint16_t timeout, bool last_click_only, ClickHandler handler)
gbitmap_sequence_update_bitmap_next_frame
bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, GBitmap *bitmap, uint32_t *delay_ms)
GColor8
Definition: pebble.h:3268
smartstrap_attribute_read
SmartstrapResult smartstrap_attribute_read(SmartstrapAttribute *attribute)
SmartstrapResultBusy
@ SmartstrapResultBusy
A request is already pending on the specified attribute.
Definition: pebble.h:4806
graphics_fill_circle
void graphics_fill_circle(GContext *ctx, GPoint p, uint16_t radius)
GCompOpAnd
@ GCompOpAnd
Definition: pebble.h:3784
tick_timer_service_unsubscribe
void tick_timer_service_unsubscribe(void)
BUTTON_ID_DOWN
@ BUTTON_ID_DOWN
Down button.
Definition: pebble.h:168
APP_LOG_LEVEL_DEBUG
@ APP_LOG_LEVEL_DEBUG
Debug level log message.
Definition: pebble.h:1527
MenuIndex
#define MenuIndex(section, row)
Macro to create a MenuIndex.
Definition: pebble.h:6883
accel_data_service_unsubscribe
void accel_data_service_unsubscribe(void)
action_bar_layer_create
ActionBarLayer * action_bar_layer_create(void)
smartstrap_service_is_available
bool smartstrap_service_is_available(SmartstrapServiceId service_id)
PropertyAnimationImplementation::accessors
PropertyAnimationAccessors accessors
The accessors to set/get the property to be animated.
Definition: pebble.h:6220
HealthMetricAlert
struct HealthMetricAlert HealthMetricAlert
Definition: pebble.h:885
ActionMenuConfig::context
void * context
a context pointer which will be accessbile when actions are performed
Definition: pebble.h:8043
MenuLayerCallbacks::get_num_sections
MenuLayerGetNumberOfSectionsCallback get_num_sections
Definition: pebble.h:7069
gbitmap_get_palette
GColor * gbitmap_get_palette(const GBitmap *bitmap)
layer_convert_point_to_screen
GPoint layer_convert_point_to_screen(const Layer *layer, GPoint point)
GTextAlignmentCenter
@ GTextAlignmentCenter
Aligns the text centered inside the drawing box.
Definition: pebble.h:4680
gdraw_command_frame_draw
void gdraw_command_frame_draw(GContext *ctx, GDrawCommandSequence *sequence, GDrawCommandFrame *frame, GPoint offset)
gcolor_equal
bool gcolor_equal(GColor8 x, GColor8 y)
True if both colors are identical or both are invisible (i.e. both have alpha values of ....
dictation_session_create
DictationSession * dictation_session_create(uint32_t buffer_size, DictationSessionStatusCallback callback, void *callback_context)
WATCH_INFO_MODEL_PEBBLE_TIME
@ WATCH_INFO_MODEL_PEBBLE_TIME
Pebble Time.
Definition: pebble.h:210
dict_read_next
Tuple * dict_read_next(DictionaryIterator *iter)
bitmap_layer_destroy
void bitmap_layer_destroy(BitmapLayer *bitmap_layer)
Destroys a window previously created by bitmap_layer_create.
MenuLayerDrawSeparatorCallback
void(* MenuLayerDrawSeparatorCallback)(GContext *ctx, const Layer *cell_layer, MenuIndex *cell_index, void *callback_context)
Definition: pebble.h:7009
graphics_text_attributes_restore_default_text_flow
void graphics_text_attributes_restore_default_text_flow(GTextAttributes *text_attributes)
status_bar_layer_get_background_color
GColor status_bar_layer_get_background_color(const StatusBarLayer *status_bar_layer)
APP_MSG_INTERNAL_ERROR
@ APP_MSG_INTERNAL_ERROR
(16384) An internal OS error prevented AppMessage from completing an operation.
Definition: pebble.h:2205
gpath_rotate_to
void gpath_rotate_to(GPath *path, int32_t angle)
ActionMenuConfig::background
GColor background
the color of the left column of the ActionMenu
Definition: pebble.h:8045
clock_to_timestamp
time_t clock_to_timestamp(WeekDay day, int hour, int minute)
DICT_MALLOC_FAILED
@ DICT_MALLOC_FAILED
Definition: pebble.h:1638
window_single_repeating_click_subscribe
void window_single_repeating_click_subscribe(ButtonId button_id, uint16_t repeat_interval_ms, ClickHandler handler)
AnimationCurveEaseIn
@ AnimationCurveEaseIn
Bicubic ease-in: accelerate from zero velocity.
Definition: pebble.h:5545
TUPLE_BYTE_ARRAY
@ TUPLE_BYTE_ARRAY
The value is an array of bytes.
Definition: pebble.h:1644
number_window_set_min
void number_window_set_min(NumberWindow *numberwindow, int32_t min)
BatteryChargeState::is_plugged
bool is_plugged
True if the charger cable is connected. False if not.
Definition: pebble.h:568
APP_LOG_LEVEL_WARNING
@ APP_LOG_LEVEL_WARNING
Warning level log message.
Definition: pebble.h:1523
DAY_UNIT
@ DAY_UNIT
Flag to represent the "days" time unit.
Definition: pebble.h:823
GTextOverflowMode
GTextOverflowMode
Definition: pebble.h:4660
WATCH_INFO_MODEL_PEBBLE_ORIGINAL
@ WATCH_INFO_MODEL_PEBBLE_ORIGINAL
Original Pebble.
Definition: pebble.h:208
ButtonId
ButtonId
Definition: pebble.h:160
APP_MSG_OUT_OF_MEMORY
@ APP_MSG_OUT_OF_MEMORY
Definition: pebble.h:2199
layer_set_update_proc
void layer_set_update_proc(Layer *layer, LayerUpdateProc update_proc)
graphics_draw_rect
void graphics_draw_rect(GContext *ctx, GRect rect)
app_message_inbox_size_maximum
uint32_t app_message_inbox_size_maximum(void)
persist_read_string
int persist_read_string(const uint32_t key, char *buffer, const size_t buffer_size)
vibes_long_pulse
void vibes_long_pulse(void)
Makes the watch emit one long vibration.
HealthActivityWalk
@ HealthActivityWalk
The 'walk' activity.
Definition: pebble.h:1029
DATA_LOGGING_INVALID_PARAMS
@ DATA_LOGGING_INVALID_PARAMS
An invalid parameter was passed to one of the functions.
Definition: pebble.h:1383