X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fclock%2Fclock.h;h=a0747971c6d3e8904be79571bdad5ff235ca6476;hb=0357305cec0f78ba4d4717467025ead6be25ce0c;hp=53c4969492c580ff3bbdf86da02fb68a774b80b5;hpb=8269d3d140bce7dafde5c8448a96d4a90bc557e7;p=chaz%2Ftint2 diff --git a/src/clock/clock.h b/src/clock/clock.h index 53c4969..a074797 100644 --- a/src/clock/clock.h +++ b/src/clock/clock.h @@ -1,6 +1,8 @@ /************************************************************************** -* clock : -* - draw clock, adjust width +* Copyright (C) 2008 thierry lorthiois (lorthiois@bbsoft.fr) +* +* Clock with fonctionnal data (timeval, precision) and drawing data (area, font, ...). +* Each panel use his own drawing data. * **************************************************************************/ @@ -17,22 +19,23 @@ typedef struct Clock { 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; } Clock; +extern char *time1_format; +extern char *time2_format; +extern struct timeval time_clock; +extern int time_precision; +extern PangoFontDescription *time1_font_desc; +extern PangoFontDescription *time2_font_desc; + + // initialize clock : y position, precision, ... -void init_clock(Clock *clock, int panel_height); +void init_clock(Clock *clock, Area *parent); -int draw_foreground_clock (void *obj, cairo_t *c); +void draw_foreground_clock (void *obj, cairo_t *c, int active); #endif