2008-10-02 18:47:02 +00:00
|
|
|
/**************************************************************************
|
2009-01-20 21:16:54 +00:00
|
|
|
* Copyright (C) 2008 thierry lorthiois (lorthiois@bbsoft.fr)
|
|
|
|
*
|
2009-02-03 20:40:46 +00:00
|
|
|
* Clock with fonctionnal data (timeval, precision) and drawing data (area, font, ...).
|
|
|
|
* Each panel use his own drawing data.
|
2009-02-07 23:28:13 +00:00
|
|
|
*
|
2008-10-02 18:47:02 +00:00
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
#ifndef CLOCK_H
|
|
|
|
#define CLOCK_H
|
|
|
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include "common.h"
|
|
|
|
#include "area.h"
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Clock {
|
|
|
|
// always start with area
|
|
|
|
Area area;
|
|
|
|
|
|
|
|
config_color font;
|
|
|
|
int time1_posy;
|
|
|
|
int time2_posy;
|
|
|
|
} Clock;
|
|
|
|
|
2009-02-07 23:28:13 +00:00
|
|
|
|
2009-02-03 20:40:46 +00:00
|
|
|
extern char *time1_format;
|
|
|
|
extern char *time2_format;
|
|
|
|
extern struct timeval time_clock;
|
|
|
|
extern int time_precision;
|
2009-02-07 23:28:13 +00:00
|
|
|
extern PangoFontDescription *time1_font_desc;
|
|
|
|
extern PangoFontDescription *time2_font_desc;
|
2009-02-03 20:40:46 +00:00
|
|
|
|
2008-10-02 18:47:02 +00:00
|
|
|
|
|
|
|
// initialize clock : y position, precision, ...
|
2009-02-07 23:28:13 +00:00
|
|
|
void init_clock(Clock *clock, Area *parent);
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2009-01-18 22:12:41 +00:00
|
|
|
void draw_foreground_clock (void *obj, cairo_t *c, int active);
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2009-02-10 23:16:10 +00:00
|
|
|
void resize_clock (void *obj);
|
2008-10-02 18:47:02 +00:00
|
|
|
|
|
|
|
#endif
|