summaryrefslogtreecommitdiffstats
path: root/movement/watch_faces/complications/day_one_face.h
blob: 06c7816e9ac312b968ca54919b7d28053a1aa5c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef DAY_ONE_FACE_H_
#define DAY_ONE_FACE_H_

#include "movement.h"

// The Day One face is designed to count upwards from the wearer's date of birth. It also functions as an
// interface for setting the birth date register, which other watch faces can use for various purposes.

typedef struct {
    uint8_t current_page;
    uint16_t current_year;
    uint16_t birth_year;
    uint8_t birth_month;
    uint8_t birth_day;
    bool birthday_changed;
} day_one_state_t;

void day_one_face_setup(movement_settings_t *settings, void ** context_ptr);
void day_one_face_activate(movement_settings_t *settings, void *context);
bool day_one_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
void day_one_face_resign(movement_settings_t *settings, void *context);

static const watch_face_t day_one_face = {
    day_one_face_setup,
    day_one_face_activate,
    day_one_face_loop,
    day_one_face_resign,
    NULL
};

#endif // DAY_ONE_FACE_H_