Pebble App Framework
v7.1.1
How It Works
CLI
Device API
Phone API
C Coverage
TS Coverage
GitHub
Theme
Pebble App Framework: Device API
Toggle main menu visibility
Loading...
Searching...
No Matches
music_track.h
Go to the documentation of this file.
1
14
#pragma once
15
#include <stdbool.h>
16
17
// MUSIC_TEXT_LEN is generated from the phone's cap table, so the two sides cannot drift
18
#include "
wire/wire_caps.g.h
"
19
24
28
typedef
struct
29
{
30
char
title
[
MUSIC_TEXT_LEN
];
31
char
artist
[
MUSIC_TEXT_LEN
];
32
bool
playing
;
33
}
MusicTrack
;
34
47
bool
music_track_set
(
MusicTrack
*track,
const
char
*title,
const
char
*artist,
bool
playing);
48
57
bool
music_track_has
(
const
MusicTrack
*track);
58
music_track_has
bool music_track_has(const MusicTrack *track)
Whether there is a track to show, which is a title or an artist.
Definition
music_track.c:28
music_track_set
bool music_track_set(MusicTrack *track, const char *title, const char *artist, bool playing)
Takes in the track the phone sent, and says whether anything changed.
Definition
music_track.c:11
MusicTrack
One track. Zeroed is nothing playing.
Definition
music_track.h:29
MusicTrack::artist
char artist[MUSIC_TEXT_LEN]
Who it is by, or empty for none.
Definition
music_track.h:31
MusicTrack::title
char title[MUSIC_TEXT_LEN]
The song's title, or empty for none.
Definition
music_track.h:30
MusicTrack::playing
bool playing
True while it plays, false while paused or with nothing playing.
Definition
music_track.h:32
wire_caps.g.h
Strip caps and marker values shared by the phone and the watch.
MUSIC_TEXT_LEN
#define MUSIC_TEXT_LEN
A now playing title or artist, 32 characters plus its terminator.
Definition
wire_caps.g.h:27
src
c
core
wire
music_track.h
Generated by
1.18.0