/**************************************************************************
* Copyright (C) 2008 thierry lorthiois (lorthiois@bbsoft.fr)
*
-* clock :
-* - draw clock, adjust width
+* Clock with fonctionnal data (timeval, precision) and drawing data (area, font, ...).
+* Each panel use his own drawing data.
*
**************************************************************************/
typedef struct Clock {
- // always start with area
- Area area;
-
- config_color font;
- PangoFontDescription *time1_font_desc;
- PangoFontDescription *time2_font_desc;
- int time1_posy;
- int time2_posy;
- char *time1_format;
- char *time2_format;
-
- struct timeval clock;
- int time_precision;
+ // always start with area
+ Area area;
+
+ config_color font;
+ int time1_posy;
+ int time2_posy;
} Clock;
+extern char *time1_format;
+extern char *time2_format;
+extern char *time_tooltip_format;
+extern PangoFontDescription *time1_font_desc;
+extern PangoFontDescription *time2_font_desc;
+extern char *clock_lclick_command;
+extern char *clock_rclick_command;
+extern int clock_enabled;
+
+
// initialize clock : y position, precision, ...
-void init_clock(Clock *clock, int panel_height);
+void init_clock();
+void init_clock_panel(void *panel);
+void cleanup_clock();
+
+void draw_clock (void *obj, cairo_t *c, int active);
-void draw_foreground_clock (void *obj, cairo_t *c, int active);
+void resize_clock (void *obj);
+void clock_action(int button);
#endif