diff options
author | Kevin Ferrare <kevin@rockbox.org> | 2007-08-04 03:01:46 +0000 |
---|---|---|
committer | Kevin Ferrare <kevin@rockbox.org> | 2007-08-04 03:01:46 +0000 |
commit | 93b2f9fd447b73fff736d71826880ef9ac64bd94 (patch) | |
tree | 1a4f54016c312738d66fb9dd2348ea0ef14f1255 /apps/plugins/clock/clock_counter.h | |
parent | ffbbc60f38ddc8aeadc9cea1102077e22ca84a1a (diff) | |
download | rockbox-93b2f9fd447b73fff736d71826880ef9ac64bd94.tar.gz rockbox-93b2f9fd447b73fff736d71826880ef9ac64bd94.zip |
Rewrote the clock plugin in a cleaner and more modular way so that it can scale on remote screens. Use left-right keys to change the type of clock displayed (analogic, digital, binary) and up/downto change the look of the clock
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14174 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/clock/clock_counter.h')
-rw-r--r-- | apps/plugins/clock/clock_counter.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/plugins/clock/clock_counter.h b/apps/plugins/clock/clock_counter.h new file mode 100644 index 0000000000..25523d45f6 --- /dev/null +++ b/apps/plugins/clock/clock_counter.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef _CLOCK_MESSAGE_ | ||
2 | #define _CLOCK_MESSAGE_ | ||
3 | #include "clock.h" | ||
4 | #include "plugin.h" | ||
5 | #include "picture.h" | ||
6 | |||
7 | struct counter{ | ||
8 | int ticks_at_last_unpause;/* to count the time from last pause to now */ | ||
9 | int ticks_since_started;/* accumulated time */ | ||
10 | bool paused; | ||
11 | }; | ||
12 | |||
13 | void counter_init(struct counter* counter); | ||
14 | void counter_toggle(struct counter* counter); | ||
15 | #define counter_reset(counter) counter_init(counter) | ||
16 | void counter_pause(struct counter* counter, bool paused); | ||
17 | void counter_get_elapsed_time(struct counter* counter, struct time* elapsed_time); | ||
18 | |||
19 | #endif /* _CLOCK_MESSAGE_ */ | ||