X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fclock%2Fclock.h;h=f607f7284f53b1199f81a3782ec14bf0f28c71f7;hb=bdf5fa4daad88f6a65b6f4be3acae7b663906e86;hp=0d3e9e1309caf14429b2156c58a47a08f44032cf;hpb=d1123a0ede12eb1126eb5eb932d9177de67d46c5;p=chaz%2Ftint2 diff --git a/src/clock/clock.h b/src/clock/clock.h index 0d3e9e1..f607f72 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. * **************************************************************************/ @@ -13,27 +15,33 @@ 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; } 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; +extern char *clock_lclick_command; +extern char *clock_rclick_command; + + // initialize clock : y position, precision, ... -void init_clock(Clock *clock, int panel_height); +void init_clock(); +void init_precision(); + +void draw_clock (void *obj, cairo_t *c, int active); -int draw_foreground_clock (void *obj, cairo_t *c); +void resize_clock (void *obj); +void clock_action(int button); #endif