32 lines
751 B
C
32 lines
751 B
C
#ifndef _HEXAGRAM_CLOCK_H
|
|
#define _HEXAGRAM_CLOCK_H
|
|
|
|
#include <stdint.h>
|
|
#include <time.h>
|
|
|
|
#include <hexagram/text.h>
|
|
|
|
typedef enum {
|
|
HEXAGRAM_CLOCK_24H,
|
|
HEXAGRAM_CLOCK_12H
|
|
} hexagram_clock_format;
|
|
|
|
typedef struct _hexagram_clock_time {
|
|
uint16_t hour, minute;
|
|
} hexagram_clock_time;
|
|
|
|
typedef struct _hexagram_clock {
|
|
hexagram_text text;
|
|
hexagram_clock_format format;
|
|
hexagram_clock_time time;
|
|
} hexagram_clock;
|
|
|
|
int hexagram_clock_init(hexagram_clock *clock,
|
|
double x,
|
|
double y,
|
|
hexagram_text_align align,
|
|
hexagram_clock_format format);
|
|
|
|
void hexagram_clock_set(hexagram_clock *clock, time_t now);
|
|
|
|
#endif /* _HEXAGRAM_CLOCK_H */
|